home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / hh_str13.zip / TEST_STR.C < prev    next >
C/C++ Source or Header  |  1993-03-13  |  77KB  |  2,931 lines

  1.  
  2. #ifdef _MSC_VER
  3. #include <malloc.h>
  4. #endif
  5.  
  6. #ifdef __BORLANDC__
  7. #include <alloc.h>
  8. #endif
  9.  
  10. #include <conio.h>
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <string.h>
  14.  
  15. #include "hhstring.h"
  16.  
  17. /*                                    */
  18. /*    global variables                        */
  19. /*                                    */
  20. char part1[80];
  21. char part2[80];
  22. int printflag;            /* command line flag controls full    */
  23.                 /*     v.s. partial printing        */
  24. int ne;             /* number of errors             */
  25. /*                                    */
  26. /*    function prototypes                        */
  27. /*                                    */
  28. void printline(char *linehead, char *answer, char *OKanswer);
  29.  
  30. /************************************************************************/
  31. /*                                    */
  32. /*    main --- hhstring library test                    */
  33. /*                                    */
  34. void main(int argc, char *argv[])
  35. {
  36. /*               01234567890123456789    to show character positions    */
  37. char *string1 = "time date size other";
  38. char *string2 = "   123456789        ";
  39. char *string3 = "Sample string w/CASE";
  40. char *string4 = "   12345.678        ";
  41. char *string5 = "1eAf57b        B13f9";
  42. char *string6 = "sub1   SUB1     sub1";
  43. char *string7 = "text1!text2,text3.so";
  44.  
  45. char *ans01 = "date size other";
  46. char *ans02 = "time date";
  47. char *ans03 = "size other";
  48. char *ans04 = "           time date";
  49. char *ans05 = "size other          ";
  50. char *ans06 = "           123456789";
  51. char *ans07 = "123456789           ";
  52. char *ans08 = "size othertime date ";
  53. char *ans09 = "123456789        ";
  54. char *ans10 = "   123456789";
  55. char *ans11 = "123456789";
  56. char *ans12 = "---123456789";
  57. char *ans13 = "123456789---";
  58. char *ans14 = "      123456789     ";
  59. char *ans15 = "      12345678      ";
  60. char *ans16 = "     123456789     ";
  61. char *ans17 = "      12345678     ";
  62. char *ans18 = "--------------------";
  63. char *ans19 = "---- date size other";
  64. char *ans20 = "time date size -----";
  65. char *ans21 = "TIME DATE SIZE OTHER";
  66. char *ans22 = "time size other";
  67. char *ans23 = "timedatesizeother";
  68. char *ans24 = "timdatsizothr";
  69. char *ans25 = "rehto ezis etad emit";
  70. char *ans26 = "time------size other";
  71. char *ans27 = "time----------------";
  72. char *ans28 = "timtsizothr";
  73. char *ans29 = "---123456789--------";
  74. char *ans30 = "other";
  75. char *ans31 = "time new size other";
  76. char *ans32 = "time---size other";
  77. char *ans33 = "  123456789 ";
  78. char *ans34 = "  123456789  ";
  79. char *ans35 = "  12345678  ";
  80. char *ans36 = "   12345678  ";
  81. char *ans37 = "123,456,789";
  82. char *ans38 = "12,345,678";
  83. char *ans39 = "1,234,567";
  84. char *ans40 = "          size other";
  85. char *ans41 = "time date           ";
  86. char *ans42 = "   123,456,789";
  87. char *ans43 = "ample tring w/CAE";
  88. char *ans44 = "-ample -tring w/CA-E";
  89. char *ans45 = " B13f9";
  90.  
  91. char work1[80];
  92. char work2[80];
  93. char work3[80];
  94. char work4[80];
  95.  
  96. char *tempp;
  97. char tempc;
  98. int tempi;                /* scratch integer        */
  99. unsigned int ii;
  100. int bad_command;
  101. /*                                    */
  102. /* print the header                            */
  103. /*                                    */
  104. printf(    "\n"
  105.     "\n    Hobbit House utility to test hhstring.lib"
  106.     "\n    -----------------------------------------\n");
  107. /*                                    */
  108. /* set defaults for command line parameters                */
  109. /*                                    */
  110. printflag = 1;
  111. bad_command = 0;            /* init bad command flag = off    */
  112. /*                                    */
  113. /* parse the command line                        */
  114. /*                                    */
  115. for(ii = 1; ii < (unsigned)argc; ii++)    /* for each of the actual    */
  116.                     /*   command line arguments:    */
  117. { tempc = toupper((argv[ii][0]));    /* get the command character    */
  118.   switch(tempc)                /* switch on the command char    */
  119.   { case 'F':                /* case for print flag        */
  120.       printflag = 0;            /* reset the print flag        */
  121.       break;                /* break case F            */
  122.     default:                /* none of the above        */
  123.       bad_command = 1;            /* save the bad command        */
  124.       break;                /* break the default case    */
  125.   }                    /* end the argument switch    */
  126.   /*                                    */
  127.   /* if a command line parameter is bad, tell the user and go bye bye    */
  128.   /*                                    */
  129.   if (bad_command)            /* if there's a bad cmd        */
  130.   { printf("\nthe command \"%s\" does "    /*   then tell the user what    */
  131.     "not compute!\n", argv[ii]);    /*     it was and exit back    */
  132.     exit(0);                /*     to DOS            */
  133.   }                    /* end if bad command        */
  134. }                    /* end for all args        */
  135.  
  136. if (printflag)
  137.   printf("\n\n\n");
  138.  
  139. /*    -    -    -    -    -    -    -    -    */
  140. /*                                    */
  141. /*    atoh                                */
  142. /*                                    */
  143. ltoa(atoh("  dead  "), work1, 16);
  144. printline("atoh #1", work1, "dead");
  145.  
  146. ltoa(atoh("beef"), work1, 16);
  147. printline("atoh #2", work1, "beef");
  148.  
  149. /*    -    -    -    -    -    -    -    -    */
  150. /*                                    */
  151. /*    atoh2                                */
  152. /*                                    */
  153. ltoa(atoh2(&tempi, "  dead  "), work1, 16);
  154. strrtpad(work1, 4, ' ');
  155. itoa(tempi, work1 + 5, 10);
  156. printline("atoh2 #1", work1, "dead 4");
  157.  
  158. ltoa(atoh2(&tempi, "1a"), work1, 16);
  159. strrtpad(work1, 4, ' ');
  160. itoa(tempi, work1 + 3, 10);
  161. printline("atoh2 #2", work1, "1a 2");
  162.  
  163. /*    -    -    -    -    -    -    -    -    */
  164. /*                                    */
  165. /*    atolh                                */
  166. /*                                    */
  167. ltoa(atolh("  deadbeef  "), work1, 16);
  168. printline("atolh #1", work1, "deadbeef");
  169.  
  170. ltoa(atolh("123456789"), work1, 16);
  171. printline("atolh #2", work1, "23456789");
  172.  
  173. /*    -    -    -    -    -    -    -    -    */
  174. /*                                    */
  175. /*    atolh2                                */
  176. /*                                    */
  177. ltoa(atolh2(&tempi, "  deadbeef  "), work1, 16);
  178. strrtpad(work1, 4, ' ');
  179. ltoa(tempi, work1 + 9, 10);
  180. printline("atolh2 #1", work1, "deadbeef 8");
  181.  
  182. ltoa(atolh2(&tempi, "  dead"), work1, 16);
  183. strrtpad(work1, 4, ' ');
  184. ltoa(tempi, work1 + 5, 10);
  185. printline("atolh2 #2", work1, "dead 4");
  186.  
  187. ltoa(atolh2(&tempi, "  123456789"), work1, 16);
  188. strrtpad(work1, 4, ' ');
  189. ltoa(tempi, work1 + 9, 10);
  190. printline("atolh2 #3", work1, "23456789 9");
  191.  
  192. /*    -    -    -    -    -    -    -    -    */
  193. /*                                    */
  194. /*    atoo                                */
  195. /*                                    */
  196. ltoa(atoo("  123456"), work1, 8);
  197. printline("atoo #1", work1, "123456");
  198.  
  199. ltoa(atoo("18"), work1, 8);
  200. printline("atoo #2", work1, "1");
  201.  
  202. /*    -    -    -    -    -    -    -    -    */
  203. /*                                    */
  204. /*    atoo2                                */
  205. /*                                    */
  206. ltoa(atoo2(&tempi, "  123456 "), work1, 8);
  207. strrtpad(work1, 4, ' ');
  208. ltoa(tempi, work1 + 7, 10);
  209. printline("atoo2 #1", work1, "123456 6");
  210.  
  211. ltoa(atoo2(&tempi, "  18"), work1, 8);
  212. strrtpad(work1, 4, ' ');
  213. ltoa(tempi, work1 + 2, 10);
  214. printline("atoo2 #1", work1, "1 1");
  215.  
  216. /*    -    -    -    -    -    -    -    -    */
  217. /*                                    */
  218. /*    btoc                                */
  219. /*                                    */
  220. work1[0] = btoc(0);
  221. work1[1] = btoc(1);
  222. work1[2] = EOS;
  223. printline("btoc", work1, "01");
  224.  
  225. /*    -    -    -    -    -    -    -    -    */
  226. /*                                    */
  227. /*    ctob                                */
  228. /*                                    */
  229. itoa(ctob('0'), work1, 10);
  230. itoa(ctob('1'), work1 + 1, 10);
  231. printline("ctob", work1, "01");
  232.  
  233. /*    -    -    -    -    -    -    -    -    */
  234. /*                                    */
  235. /*    ctod                                */
  236. /*                                    */
  237. itoa(ctod('0'), work1, 10);
  238. itoa(ctod('9'), work1 + 1, 10);
  239. printline("ctod", work1, "09");
  240.  
  241. /*    -    -    -    -    -    -    -    -    */
  242. /*                                    */
  243. /*    ctoh                                */
  244. /*                                    */
  245. itoa(ctoh('0'), work1, 16);
  246. itoa(ctoh('f'), work1 + 1, 16);
  247. printline("ctoh", work1, "0f");
  248.  
  249. /*    -    -    -    -    -    -    -    -    */
  250. /*                                    */
  251. /*    dtoc                                */
  252. /*                                    */
  253. work1[0] = dtoc(0);
  254. work1[1] = dtoc(9);
  255. work1[2] = dtoc(10);        /* use error return to insert EOS    */
  256. printline("dtoc", work1, "09");
  257.  
  258. /*    -    -    -    -    -    -    -    -    */
  259. /*                                    */
  260. /*    fnconv_1to2                            */
  261. /*                                    */
  262. strcpy(work1, "sub1.h");
  263. fnconv_1to2(work1);
  264. printline("fnconv_1to2 #1", work1, "sub1     h  ");
  265.  
  266. strcpy(work1, "thisfile.ext");
  267. fnconv_1to2(work1);
  268. printline("fnconv_1to2 #2", work1, "thisfile ext");
  269.  
  270. /*    -    -    -    -    -    -    -    -    */
  271. /*                                    */
  272. /*    fnconv_2to1                            */
  273. /*                                    */
  274. strcpy(work1, "sub1     h  ");
  275. fnconv_2to1(work1);
  276. printline("fnconv_2to1 #1", work1, "sub1.h");
  277.  
  278. strcpy(work1, "thisfile ext");
  279. fnconv_2to1(work1);
  280. printline("fnconv_2to1 #2", work1, "thisfile.ext");
  281.  
  282. /*    -    -    -    -    -    -    -    -    */
  283. /*                                    */
  284. /*    htoc                                */
  285. /*                                    */
  286. work1[0] = htoc(0);
  287. work1[1] = htoc(15);
  288. work1[2] = htoc(16);        /* use error return to put in EOS    */
  289. printline("htoc", work1, "0F");
  290.  
  291. /*    -    -    -    -    -    -    -    -    */
  292. /*                                    */
  293. /*    isfilename                            */
  294. /*                                    */
  295. strcpy(work1, "12345678.9ab");
  296. itoa(isfilename(work1), work2, 10);
  297. strrtsize(work2, 4);
  298. printline("isfilename #1", strcat(work2, work1), "0   12345678.9ab");
  299.  
  300. strcpy(work1, "*.bak");
  301. itoa(isfilename(work1), work2, 10);
  302. strrtsize(work2, 4);
  303. printline("isfilename #2", strcat(work2, work1), "-1  *.bak");
  304.  
  305. strcpy(work1, "123<5>78.9ab");
  306. itoa(isfilename(work1), work2, 10);
  307. strrtsize(work2, 4);
  308. printline("isfilename #3", strcat(work2, work1), "-2  123<5>78.9ab");
  309.  
  310. strcpy(work1, "123456789.ab");
  311. itoa(isfilename(work1), work2, 10);
  312. strrtsize(work2, 4);
  313. printline("isfilename #4", strcat(work2, work1), "-3  123456789.ab");
  314.  
  315. strcpy(work1, "1234567.89ab");
  316. itoa(isfilename(work1), work2, 10);
  317. strrtsize(work2, 4);
  318. printline("isfilename #5", strcat(work2, work1), "-4  1234567.89ab");
  319.  
  320. strcpy(work1, "*234*.abc");
  321. itoa(isfilename(work1), work2, 10);
  322. strrtsize(work2, 4);
  323. printline("isfilename #6", strcat(work2, work1), "-5  *234*.abc");
  324.  
  325. /*    -    -    -    -    -    -    -    -    */
  326. /*                                    */
  327. /*    ptrfirstblank                            */
  328. /*                                    */
  329. printline("ptrfirstblank #1", 1 + ptrfirstblank(string1), ans01);
  330.  
  331. printline("ptrfirstblank #2", ptrfirstblank("abcd123"), NULL);
  332.  
  333. /*    -    -    -    -    -    -    -    -    */
  334. /*                                    */
  335. /*    ptrfirstchr                            */
  336. /*                                    */
  337. printline("ptrfirstchr #1", ptrfirstchr(string1, 'd'), string1 + 5);
  338.  
  339. printline("ptrfirstchr #2", ptrfirstchr(string1, 't'), string1);
  340.  
  341. printline("ptrfirstchr #3", ptrfirstchr(string1, 'T'), NULL);
  342.  
  343. /*    -    -    -    -    -    -    -    -    */
  344. /*                                    */
  345. /*    ptrfirstchri                            */
  346. /*                                    */
  347. printline("ptrfirstchri #1", ptrfirstchri(string1, 'D'), string1 + 5);
  348.  
  349. printline("ptrfirstchri #2", ptrfirstchri(string1, 'T'), string1);
  350.  
  351. printline("ptrfirstchri #3", ptrfirstchri(string1, 'b'), NULL);
  352.  
  353. /*    -    -    -    -    -    -    -    -    */
  354. /*                                    */
  355. /*    ptrfirstdig                            */
  356. /*                                    */
  357. printline("ptrfirstdig #1", ptrfirstdig(string2), ans09);
  358.  
  359. printline("ptrfirstdig #2", ptrfirstdig(string1), NULL);
  360.  
  361. /*    -    -    -    -    -    -    -    -    */
  362. /*                                    */
  363. /*    ptrfirsthex                            */
  364. /*                                    */
  365. printline("ptrfirsthex #1", ptrfirsthex(string2), ans09);
  366.  
  367. printline("ptrfirsthex #2", ptrfirsthex(string5 + 9), ans45 + 1);
  368.  
  369. printline("ptrfirsthex #3", ptrfirsthex("ghijklmn"), NULL);
  370.  
  371. /*    -    -    -    -    -    -    -    -    */
  372. /*                                    */
  373. /*    ptrfirstnotblank                        */
  374. /*                                    */
  375. printline("ptrfirstnotblank #1", ptrfirstnotblank(string2), ans09);
  376.  
  377. printline("ptrfirstnotblank #2", ptrfirstnotblank("   "), NULL);
  378.  
  379. /*    -    -    -    -    -    -    -    -    */
  380. /*                                    */
  381. /*    ptrfirstnotchr                            */
  382. /*                                    */
  383. printline("ptrfirstnotchr #1", ptrfirstnotchr(string2, ' '), ans09);
  384.  
  385. printline("ptrfirstnotchr #2", ptrfirstnotchr(ans18, '-'), NULL);
  386.  
  387. /*    -    -    -    -    -    -    -    -    */
  388. /*                                    */
  389. /*    ptrfirstnotchri                            */
  390. /*                                    */
  391. printline("ptrfirstnotchri #1", ptrfirstnotchri(string3, 's'), string3 + 1);
  392.  
  393. printline("ptrfirstnotchri #2", ptrfirstnotchri("aAaAa", 'a'), NULL);
  394.  
  395. /*    -    -    -    -    -    -    -    -    */
  396. /*                                    */
  397. /*    ptrfirstnotdig                            */
  398. /*                                    */
  399. printline("ptrfirstnotdig #1", ptrfirstnotdig(ans37), ans37 + 3);
  400.  
  401. printline("ptrfirstnotdig #2", ptrfirstnotdig("123"), NULL);
  402.  
  403. /*    -    -    -    -    -    -    -    -    */
  404. /*                                    */
  405. /*    ptrfirstnothex                            */
  406. /*                                    */
  407. printline("ptrfirstnothex #1", ptrfirstnothex(string5), string5 + 7);
  408.  
  409. printline("ptrfirstnothex #2", ptrfirstnothex(ans11), NULL);
  410.  
  411. /*    -    -    -    -    -    -    -    -    */
  412. /*                                    */
  413. /*    ptrfirstnotrange                        */
  414. /*                                    */
  415. printline("ptrfirstnotrange #1",
  416.         ptrfirstnotrange(ans37, '0', '9'), ans37 + 3);
  417.  
  418. printline("ptrfirstnotrange #2",
  419.         ptrfirstnotrange(string2, ' ', '9'), NULL);
  420.  
  421. /*    -    -    -    -    -    -    -    -    */
  422. /*                                    */
  423. /*    ptrfirstnotgr                            */
  424. /*                                    */
  425. printline("ptrfirstnotgr #1",
  426.         ptrfirstnotgr(ans37, "0123456789"), ans37 + 3);
  427.  
  428. printline("ptrfirstnotgr #2",
  429.         ptrfirstnotgr("abcabc", "abc"), NULL);
  430.  
  431. /*    -    -    -    -    -    -    -    -    */
  432. /*                                    */
  433. /*    ptrfirstnottextterm                        */
  434. /*                                    */
  435. printline("ptrfirstnottextterm #1", ptrfirstnottextterm(ans06), ans11);
  436.  
  437. printline("ptrfirstnottextterm #2", ptrfirstnottextterm("     "), NULL);
  438.  
  439. /*    -    -    -    -    -    -    -    -    */
  440. /*                                    */
  441. /*    ptrfirstnotwhite                        */
  442. /*                                    */
  443. printline("ptrfirstnotwhite #1", ptrfirstnotwhite(string2), ans09);
  444.  
  445. printline("ptrfirstnotwhite #2", ptrfirstnotwhite("      "), NULL);
  446.  
  447. /*    -    -    -    -    -    -    -    -    */
  448. /*                                    */
  449. /*    ptrfirstrange                            */
  450. /*                                    */
  451. printline("ptrfirstrange #1", ptrfirstrange(string1, 'a', 'd'), ans01);
  452.  
  453. printline("ptrfirstrange #2", ptrfirstrange(string1, 'A', 'Z'), NULL);
  454.  
  455. printline("ptrfirstrange #3", ptrfirstrange(string2, '9', '0'), NULL);
  456.  
  457. /*    -    -    -    -    -    -    -    -    */
  458. /*                                    */
  459. /*    ptrfirstgr                            */
  460. /*                                    */
  461. printline("ptrfirstgr #1", ptrfirstgr(string2, "0123456789"), ans09);
  462.  
  463. printline("ptrfirstgr #2", ptrfirstgr(string1, "0123456789"), NULL);
  464.  
  465. printline("ptrfirstgr #3", ptrfirstgr(string1, ""), NULL);
  466.  
  467. /*    -    -    -    -    -    -    -    -    */
  468. /*                                    */
  469. /*    ptrfirstsub                            */
  470. /*                                    */
  471. printline("ptrfirstsub #1", ptrfirstsub(string1, ans30), ans30);
  472.  
  473. printline("ptrfirstsub #2", ptrfirstsub(string1, "time"), string1);
  474.  
  475. printline("ptrfirstsub #3", ptrfirstsub(string1, "not here"), NULL);
  476.  
  477. /*    -    -    -    -    -    -    -    -    */
  478. /*                                    */
  479. /*    ptrfirstsubi                            */
  480. /*                                    */
  481. printline("ptrfirstsubi #1", ptrfirstsubi(ans21, "other"), "OTHER");
  482.  
  483. printline("ptrfirstsubi #2", ptrfirstsubi(string1, "OTHER"), ans30);
  484.  
  485. printline("ptrfirstsubi #3", ptrfirstsubi(string1, "not here"), NULL);
  486.  
  487. /*    -    -    -    -    -    -    -    -    */
  488. /*                                    */
  489. /*    ptrfirsttext                            */
  490. /*                                    */
  491. printline("ptrfirsttext #1", ptrfirsttext(ans04), ans02);
  492.  
  493. printline("ptrfirsttext #2", ptrfirsttext("!.,;:this"), "this");
  494.  
  495. printline("ptrfirsttext #3", ptrfirsttext("!.,;:"), NULL);
  496.  
  497. /*    -    -    -    -    -    -    -    -    */
  498. /*                                    */
  499. /*    ptrfirsttextterm                        */
  500. /*                                    */
  501. printline("ptrfirsttextterm #1", ptrfirsttextterm(string7), string7 + 5);
  502.  
  503. printline("ptrfirsttextterm #2", ptrfirsttextterm("this:is"), ":is");
  504.  
  505. printline("ptrfirsttextterm #3", ptrfirsttextterm("nonehere"), NULL);
  506.  
  507. /*    -    -    -    -    -    -    -    -    */
  508. /*                                    */
  509. /*    ptrfirstwhite                            */
  510. /*                                    */
  511. printline("ptrfirstwhite #1", ptrfirstwhite(string1), string1 + 4);
  512.  
  513. printline("ptrfirstwhite #2", ptrfirstwhite("abc\tother"), "\tother");
  514.  
  515. printline("ptrfirstwhite #3", ptrfirstwhite(ans18), NULL);
  516.  
  517. /*    -    -    -    -    -    -    -    -    */
  518. /*                                    */
  519. /*    ptrfirstword                            */
  520. /*                                    */
  521. printline("ptrfirstword #1", ptrfirstword(string2), ans09);
  522.  
  523. printline("ptrfirstword #2", ptrfirstword(string1 + 15), string1 + 15);
  524.  
  525. printline("ptrfirstword #3", ptrfirstword("    "), NULL);
  526.  
  527. /*    -    -    -    -    -    -    -    -    */
  528. /*                                    */
  529. /*    ptrlastblank                            */
  530. /*                                    */
  531. printline("ptrlastblank #1", ptrlastblank(string1), string1 + 14);
  532.  
  533. printline("ptrlastblank #2", ptrlastblank(ans18), NULL);
  534.  
  535. /*    -    -    -    -    -    -    -    -    */
  536. /*                                    */
  537. /*    ptrlastchr                            */
  538. /*                                    */
  539. printline("ptrlastchr #1", ptrlastchr(string1, 'e'), "er");
  540.  
  541. printline("ptrlastchr #2", ptrlastchr(string2, 'e'), NULL);
  542.  
  543. /*    -    -    -    -    -    -    -    -    */
  544. /*                                    */
  545. /*    ptrlastchri                            */
  546. /*                                    */
  547. printline("ptrlastchri #1", ptrlastchri(string1, 'E'), "er");
  548.  
  549. printline("ptrlastchri #2", ptrlastchri(ans21, 'e'), "ER");
  550.  
  551. printline("ptrlastchri #3", ptrlastchri(string2, 'E'), NULL);
  552.  
  553. /*    -    -    -    -    -    -    -    -    */
  554. /*                                    */
  555. /*    ptrlastdig                            */
  556. /*                                    */
  557. printline("ptrlastdig #1", ptrlastdig(string2), string2 + 11);
  558.  
  559. printline("ptrlastdig #2", ptrlastdig(ans06), "9");
  560.  
  561. printline("ptrlastdig #3", ptrlastdig(string1), NULL);
  562.  
  563. /*    -    -    -    -    -    -    -    -    */
  564. /*                                    */
  565. /*    ptrlasthex                            */
  566. /*                                    */
  567. printline("ptrlasthex #1", ptrlasthex(string2), string2 + 11);
  568.  
  569. printline("ptrlasthex #2", ptrlasthex(string1), string1 + 18);
  570.  
  571. printline("ptrlasthex #3", ptrlasthex(ans18), NULL);
  572.  
  573. /*    -    -    -    -    -    -    -    -    */
  574. /*                                    */
  575. /*    ptrlastnotblank                            */
  576. /*                                    */
  577. printline("ptrlastnotblank #1", ptrlastnotblank(string2), string2 + 11);
  578.  
  579. printline("ptrlastnotblank #2", ptrlastnotblank(string1), "r");
  580.  
  581. printline("ptrlastnotblank #3", ptrlastnotblank("   "), NULL);
  582.  
  583. /*    -    -    -    -    -    -    -    -    */
  584. /*                                    */
  585. /*    ptrlastnotchr                            */
  586. /*                                    */
  587. printline("ptrlastnotchr #1", ptrlastnotchr(string2, ' '), string2 + 11);
  588.  
  589. printline("ptrlastnotchr #2", ptrlastnotchr(string1, 'r'), "er");
  590.  
  591. printline("ptrlastnotchr #3", ptrlastnotchr(ans18, '-'), NULL);
  592.  
  593. /*    -    -    -    -    -    -    -    -    */
  594. /*                                    */
  595. /*    ptrlastnotchri                            */
  596. /*                                    */
  597. printline("ptrlastnotchri #1", ptrlastnotchri(string1, 'R'), "er");
  598.  
  599. printline("ptrlastnotchri #2", ptrlastnotchri(ans21, 'r'), "ER");
  600.  
  601. printline("ptrlastnotchri #3", ptrlastnotchri(ans18, '-'), NULL);
  602.  
  603. /*    -    -    -    -    -    -    -    -    */
  604. /*                                    */
  605. /*    ptrlastnotdig                            */
  606. /*                                    */
  607. printline("ptrlastnotdig #1", ptrlastnotdig(ans12), ans12 + 2);
  608.  
  609. printline("ptrlastnotdig #2", ptrlastnotdig(string1), "r");
  610.  
  611. printline("ptrlastnotdig #3", ptrlastnotdig(ans11), NULL);
  612.  
  613. /*    -    -    -    -    -    -    -    -    */
  614. /*                                    */
  615. /*    ptrlastnothex                            */
  616. /*                                    */
  617. printline("ptrlastnothex #1", ptrlastnothex(ans12), ans12 + 2);
  618.  
  619. printline("ptrlastnothex #2", ptrlastnothex(string5), ans45);
  620.  
  621. printline("ptrlastnothex #3", ptrlastnothex(ans11), NULL);
  622.  
  623. /*    -    -    -    -    -    -    -    -    */
  624. /*                                    */
  625. /*    ptrlastnotrange                            */
  626. /*                                    */
  627. printline("ptrlastnotrange #1", ptrlastnotrange(ans27, ' ', '?'), ans27 + 3);
  628.  
  629. printline("ptrlastnotrange #2", ptrlastnotrange(string1, ' ', 'z'), NULL);
  630.  
  631. /*    -    -    -    -    -    -    -    -    */
  632. /*                                    */
  633. /*    ptrlastnotgr                            */
  634. /*                                    */
  635. printline("ptrlastnotgr #1",
  636.         ptrlastnotgr(ans37, "0123456789"), ans37 + 7);
  637.  
  638. printline("ptrlastnotgr #2",
  639.         ptrlastnotgr("abcabc", "abc"), NULL);
  640.  
  641. /*    -    -    -    -    -    -    -    -    */
  642. /*                                    */
  643. /*    ptrlastnottextterm                        */
  644. /*                                    */
  645. printline("ptrlastnottextterm #1", ptrlastnottextterm("abc.\t,"), "c.\t,");
  646.  
  647. printline("ptrlastnottextterm #2", ptrlastnottextterm(". , ! ; :"), NULL);
  648.  
  649. /*    -    -    -    -    -    -    -    -    */
  650. /*                                    */
  651. /*    ptrlastnotwhite                            */
  652. /*                                    */
  653. printline("ptrlastnotwhite #1", ptrlastnotwhite("abc \t "), "c \t ");
  654.  
  655. printline("ptrlastnotwhite #2", ptrlastnotwhite("   \t  "), NULL);
  656.  
  657. /*    -    -    -    -    -    -    -    -    */
  658. /*                                    */
  659. /*    ptrlastnotwordterm                        */
  660. /*                                    */
  661. printline("ptrlastnotwordterm #1", ptrlastnotwordterm("abc \t "), "c \t ");
  662.  
  663. printline("ptrlastnotwordterm #2", ptrlastnotwordterm(" \t "), NULL);
  664.  
  665. /*    -    -    -    -    -    -    -    -    */
  666. /*                                    */
  667. /*    ptrlastrange                            */
  668. /*                                    */
  669. printline("ptrlastrange #1", ptrlastrange(string2, '0', '9'), string2 + 11);
  670.  
  671. printline("ptrlastrange #2", ptrlastrange(ans18, '0', '9'), NULL);
  672.  
  673. /*    -    -    -    -    -    -    -    -    */
  674. /*                                    */
  675. /*    ptrlastgr                            */
  676. /*                                    */
  677. printline("ptrlastgr #1", ptrlastgr(string2, "0123456789"), string2 + 11);
  678.  
  679. printline("ptrlastgr #2", ptrlastgr(ans18, "0123456789"), NULL);
  680.  
  681. /*    -    -    -    -    -    -    -    -    */
  682. /*                                    */
  683. /*    ptrlastsub                            */
  684. /*                                    */
  685. printline("ptrlastsub #1", ptrlastsub(string6, "sub1"), string6 + 16);
  686.  
  687. printline("ptrlastsub #2", ptrlastsub(string1, "size"), ans03);
  688.  
  689. printline("ptrlastsub #3", ptrlastsub(string6, "not here"), NULL);
  690.  
  691. /*    -    -    -    -    -    -    -    -    */
  692. /*                                    */
  693. /*    ptrlastsubi                            */
  694. /*                                    */
  695. printline("ptrlastsubi #1", ptrlastsubi(string6, "SUB1"), string6 + 16);
  696.  
  697. printline("ptrlastsubi #2", ptrlastsubi(ans21, "size"), ans21 + 10);
  698.  
  699. printline("ptrlastsubi #3", ptrlastsubi(string6, "not here"), NULL);
  700.  
  701. /*    -    -    -    -    -    -    -    -    */
  702. /*                                    */
  703. /*    ptrlasttext                            */
  704. /*                                    */
  705. /*                                    */
  706. printline("ptrlasttext #1", ptrlasttext(string7), "so");
  707.  
  708. printline("ptrlasttext #2", ptrlasttext(", ! ; :"), NULL);
  709.  
  710. /*    -    -    -    -    -    -    -    -    */
  711. /*                                    */
  712. /*    ptrlasttextterm                            */
  713. /*                                    */
  714. printline("ptrlasttextterm #1", ptrlasttextterm(string7), ".so");
  715.  
  716. printline("ptrlasttextterm #2", ptrlasttextterm("nonehere"), NULL);
  717.  
  718. /*    -    -    -    -    -    -    -    -    */
  719. /*                                    */
  720. /*    ptrlastwhite                            */
  721. /*                                    */
  722. printline("ptrlastwhite #1", ptrlastwhite(string1), string1 + 14);
  723.  
  724. printline("ptrlastwhite #2", 1 + ptrlastwhite("abc\tother"), ans30);
  725.  
  726. printline("ptrlastwhite #3", ptrlastwhite(ans18), NULL);
  727.  
  728. /*    -    -    -    -    -    -    -    -    */
  729. /*                                    */
  730. /*    ptrlastword                            */
  731. /*                                    */
  732. printline("ptrlastword #1", ptrlastword(string1), ans30);
  733.  
  734. printline("ptrlastword #2", ptrlastword(ans18), ans18);
  735.  
  736. printline("ptrlastword #3", ptrlastword("   "), NULL);
  737.  
  738. /*    -    -    -    -    -    -    -    -    */
  739. /*                                    */
  740. /*    ptrnextblank                            */
  741. /*                                    */
  742. printline("ptrnextblank #1", ptrnextblank(string1), string1 + 4);
  743.  
  744. printline("ptrnextblank #2", ptrnextblank(ans18), NULL);
  745.  
  746. /*    -    -    -    -    -    -    -    -    */
  747. /*                                    */
  748. /*    ptrnextchr                            */
  749. /*                                    */
  750. printline("ptrnextchr #1", ptrnextchr(string1, 'd'), string1 + 5);
  751.  
  752. printline("ptrnextchr #2", ptrnextchr(string1, 't'), string1 + 7);
  753.  
  754. printline("ptrnextchr #3", ptrnextchr(string1 + 5, 'd'), NULL);
  755.  
  756. /*    -    -    -    -    -    -    -    -    */
  757. /*                                    */
  758. /*    ptrnextchri                            */
  759. /*                                    */
  760. printline("ptrnextchri #1", ptrnextchri(string1, 'D'), string1 + 5);
  761.  
  762. printline("ptrnextchri #2", ptrnextchri(string1, 'T'), string1 + 7);
  763.  
  764. printline("ptrnextchri #3", ptrnextchri(string1, 'b'), NULL);
  765.  
  766. /*    -    -    -    -    -    -    -    -    */
  767. /*                                    */
  768. /*    ptrnextdig                            */
  769. /*                                    */
  770. printline("ptrnextdig #1", ptrnextdig(string2), ans09);
  771.  
  772. printline("ptrnextdig #2", ptrnextdig(string2 + 5), string2 + 6);
  773.  
  774. printline("ptrnextdig #3", ptrnextdig(string1), NULL);
  775.  
  776. /*    -    -    -    -    -    -    -    -    */
  777. /*                                    */
  778. /*    ptrnexthex                            */
  779. /*                                    */
  780. printline("ptrnexthex #1", ptrnexthex(string2), ans09);
  781.  
  782. printline("ptrnexthex #2", ptrnexthex(string5), string5 + 1);
  783.  
  784. printline("ptrnexthex #3", ptrnexthex("ghijklmn"), NULL);
  785.  
  786. /*    -    -    -    -    -    -    -    -    */
  787. /*                                    */
  788. /*    ptrnextnotblank                            */
  789. /*                                    */
  790. printline("ptrnextnotblank #1", ptrnextnotblank(string2), ans09);
  791.  
  792. printline("ptrnextnotblank #2", ptrnextnotblank(string1 + 4), ans01);
  793.  
  794. printline("ptrnextnotblank #3", ptrnextnotblank("   "), NULL);
  795.  
  796. /*    -    -    -    -    -    -    -    -    */
  797. /*                                    */
  798. /*    ptrnextnotchr                            */
  799. /*                                    */
  800. printline("ptrnextnotchr #1", ptrnextnotchr(string1 + 4, ' '), ans01);
  801.  
  802. printline("ptrnextnotchr #2", ptrnextnotchr(ans18, '-'), NULL);
  803.  
  804. /*    -    -    -    -    -    -    -    -    */
  805. /*                                    */
  806. /*    ptrnextnotchri                            */
  807. /*                                    */
  808. printline("ptrnextnotchri #1", ptrnextnotchri("bAaAab", 'a'), "b");
  809.  
  810. printline("ptrnextnotchri #2", ptrnextnotchri("aAaAa", 'a'), NULL);
  811.  
  812. /*    -    -    -    -    -    -    -    -    */
  813. /*                                    */
  814. /*    ptrnextnotdig                            */
  815. /*                                    */
  816. printline("ptrnextnotdig #1", ptrnextnotdig(ans37), ans37 + 3);
  817.  
  818. printline("ptrnextnotdig #2", ptrnextnotdig(ans37 + 3), ans37 + 7);
  819.  
  820. printline("ptrnextnotdig #3", ptrnextnotdig("123"), NULL);
  821.  
  822. /*    -    -    -    -    -    -    -    -    */
  823. /*                                    */
  824. /*    ptrnextnothex                            */
  825. /*                                    */
  826. printline("ptrnextnothex #1", ptrnextnothex(string5), string5 + 7);
  827.  
  828. printline("ptrnextnothex #2", ptrnextnothex(ans11), NULL);
  829.  
  830. /*    -    -    -    -    -    -    -    -    */
  831. /*                                    */
  832. /*    ptrnextnotrange                            */
  833. /*                                    */
  834. printline("ptrnextnotrange #1",
  835.         ptrnextnotrange(ans37 + 3, '0', '9'), ans37 + 7);
  836.  
  837. printline("ptrnextnotrange #2",
  838.         ptrnextnotrange(string2, ' ', '9'), NULL);
  839.  
  840. /*    -    -    -    -    -    -    -    -    */
  841. /*                                    */
  842. /*    ptrnextnotgr                            */
  843. /*                                    */
  844. printline("ptrnextnotgr #1",
  845.         ptrnextnotgr(ans37 + 3, "0123456789"), ans37 + 7);
  846.  
  847. printline("ptrnextnotgr #2",
  848.         ptrnextnotgr("dabcabc", "abc"), NULL);
  849.  
  850. /*    -    -    -    -    -    -    -    -    */
  851. /*                                    */
  852. /*    ptrnextnottextterm                        */
  853. /*                                    */
  854. printline("ptrnextnottextterm #1", ptrnextnottextterm("., !:is"), "is");
  855.  
  856. printline("ptrnextnottextterm #2", ptrnextnottextterm("., !:"), NULL);
  857.  
  858. /*    -    -    -    -    -    -    -    -    */
  859. /*                                    */
  860. /*    ptrnextnotwhite                            */
  861. /*                                    */
  862. printline("ptrnextnotwhite #1", ptrnextnotwhite(string2), ans09);
  863.  
  864. printline("ptrnextnotwhite #2", ptrnextnotwhite("a     "), NULL);
  865.  
  866. /*    -    -    -    -    -    -    -    -    */
  867. /*                                    */
  868. /*    ptrnextrange                            */
  869. /*                                    */
  870. printline("ptrnextrange #1", ptrnextrange(string1, 'a', 'd'), ans01);
  871.  
  872. printline("ptrnextrange #2", ptrnextrange(string5, ' ', 'z'), string5 + 1);
  873.  
  874. printline("ptrnextrange #3", ptrnextrange(string1, 'A', 'Z'), NULL);
  875.  
  876. printline("ptrnextrange #4", ptrnextrange(string2, '9', '0'), NULL);
  877.  
  878. /*    -    -    -    -    -    -    -    -    */
  879. /*                                    */
  880. /*    ptrnextgr                            */
  881. /*                                    */
  882. printline("ptrnextgr #1", ptrnextgr(string2, "0123456789"), ans09);
  883.  
  884. printline("ptrnextgr #2", ptrnextgr(string5, "1ea"), string5 + 1);
  885.  
  886. printline("ptrnextgr #3", ptrnextgr(string1, "0123456789"), NULL);
  887.  
  888. printline("ptrnextgr #4", ptrnextgr(string1, ""), NULL);
  889.  
  890. /*    -    -    -    -    -    -    -    -    */
  891. /*                                    */
  892. /*    ptrnextsub                            */
  893. /*                                    */
  894. printline("ptrnextsub #1", ptrnextsub(string1, ans30), ans30);
  895.  
  896. printline("ptrnextsub #2", ptrnextsub(string1, ans01), ans01);
  897.  
  898. printline("ptrnextsub #3", ptrnextsub(string1, "time"), NULL);
  899.  
  900. /*    -    -    -    -    -    -    -    -    */
  901. /*                                    */
  902. /*    ptrnextsubi                            */
  903. /*                                    */
  904. printline("ptrnextsubi #1", ptrnextsubi(ans21, "other"), "OTHER");
  905.  
  906. printline("ptrnextsubi #2", ptrnextsubi(string1, "OTHER"), ans30);
  907.  
  908. printline("ptrnextsubi #3", ptrnextsubi(string1, ans01), ans01);
  909.  
  910. printline("ptrnextsubi #4", ptrnextsubi(string1, "time"), NULL);
  911.  
  912. /*    -    -    -    -    -    -    -    -    */
  913. /*                                    */
  914. /*    ptrnexttext                            */
  915. /*                                    */
  916. printline("ptrnexttext #1", ptrnexttext(string7), string7 + 6);
  917.  
  918. printline("ptrnexttext #2", ptrnexttext(" ! , : "), NULL);
  919.  
  920. /*    -    -    -    -    -    -    -    -    */
  921. /*                                    */
  922. /*    ptrnexttextterm                            */
  923. /*                                    */
  924. printline("ptrnexttextterm #1", ptrnexttextterm(string7), string7 + 5);
  925.  
  926. printline("ptrnexttextterm #2", ptrnexttextterm("nonehere"), NULL);
  927.  
  928.  
  929. /*    -    -    -    -    -    -    -    -    */
  930. /*                                    */
  931. /*    ptrnextwhite                            */
  932. /*                                    */
  933. printline("ptrnextwhite #1", ptrnextwhite(string1), string1 + 4);
  934.  
  935. printline("ptrnextwhite #2", ptrnextwhite("abc\tother"), "\tother");
  936.  
  937. printline("ptrnextwhite #3", ptrnextwhite("\tother"), NULL);
  938.  
  939. /*    -    -    -    -    -    -    -    -    */
  940. /*                                    */
  941. /*    ptrnextword                            */
  942. /*                                    */
  943. printline("ptrnextword #1", ptrnextword(string2), ans09);
  944.  
  945. printline("ptrnextword #2", ptrnextword(string1), ans01);
  946.  
  947. printline("ptrnextword #3", ptrnextword("    "), NULL);
  948.  
  949. /*    -    -    -    -    -    -    -    -    */
  950. /*                                    */
  951. /*    ptrprevblank                            */
  952. /*                                    */
  953. printline("ptrprevblank #1", ptrprevblank(strend(string1)), string1 + 14);
  954.  
  955. printline("ptrprevblank #2", ptrprevblank(string1 + 9), string1 + 4);
  956.  
  957. /*    -    -    -    -    -    -    -    -    */
  958. /*                                    */
  959. /*    ptrprevchr                            */
  960. /*                                    */
  961. printline("ptrprevchr #1", ptrprevchr(strend(string1), 'e'), "er");
  962.  
  963. printline("ptrprevchr #2", ptrprevchr(string1 + 9, ' '), string1 + 4);
  964.  
  965. /*    -    -    -    -    -    -    -    -    */
  966. /*                                    */
  967. /*    ptrprevchri                            */
  968. /*                                    */
  969. printline("ptrprevchri #1", ptrprevchri(strend(string1), 'E'), "er");
  970.  
  971. printline("ptrprevchri #2", ptrprevchri(strend(ans21), 'e'), "ER");
  972.  
  973. /*    -    -    -    -    -    -    -    -    */
  974. /*                                    */
  975. /*    ptrprevdig                            */
  976. /*                                    */
  977. printline("ptrprevdig #1", ptrprevdig(strend(string2)), string2 + 11);
  978.  
  979. printline("ptrprevdig #2", ptrprevdig(string5 + 4), string5);
  980.  
  981. printline("ptrprevdig #3", ptrprevdig(strend(ans06)), "9");
  982.  
  983. /*    -    -    -    -    -    -    -    -    */
  984. /*                                    */
  985. /*    ptrprevhex                            */
  986. /*                                    */
  987. printline("ptrprevhex #1", ptrprevhex(strend(string2)), string2 + 11);
  988.  
  989. printline("ptrprevhex #2", ptrprevhex(strend(string1)), string1 + 18);
  990.  
  991. /*    -    -    -    -    -    -    -    -    */
  992. /*                                    */
  993. /*    ptrprevnotblank                            */
  994. /*                                    */
  995. printline("ptrprevnotblank #1", ptrprevnotblank(strend(string2)), string2 + 11);
  996.  
  997. printline("ptrprevnotblank #2", ptrprevnotblank(string1 + 5), string1 + 3);
  998.  
  999. /*    -    -    -    -    -    -    -    -    */
  1000. /*                                    */
  1001. /*    ptrprevnotchr                            */
  1002. /*                                    */
  1003. printline("ptrprevnotchr #1", ptrprevnotchr(strend(string2), ' '), string2 + 11);
  1004.  
  1005. printline("ptrprevnotchr #2", ptrprevnotchr(string1 + 6, 'a'), ans01);
  1006.  
  1007. /*    -    -    -    -    -    -    -    -    */
  1008. /*                                    */
  1009. /*    ptrprevnotchri                            */
  1010. /*                                    */
  1011. printline("ptrprevnotchri #1", ptrprevnotchri(strend(string1), 'R'), "er");
  1012.  
  1013. printline("ptrprevnotchri #2", ptrprevnotchri(strend(ans21), 'r'), "ER");
  1014.  
  1015. /*printline("ptrprevnotchri #3", ptrprevnotchri(string1 + 6, 'A'), ans01);
  1016.  
  1017. /*    -    -    -    -    -    -    -    -    */
  1018. /*                                    */
  1019. /*    ptrprevnotdig                            */
  1020. /*                                    */
  1021. printline("ptrprevnotdig #1", ptrprevnotdig(strend(ans12)), ans12 + 2);
  1022.  
  1023. printline("ptrprevnotdig #2", ptrprevnotdig(strend(string1)), "r");
  1024.  
  1025. printline("ptrprevnotdig #3", 1 + ptrprevnotdig(string2 + 9), ans09);
  1026.  
  1027. /*    -    -    -    -    -    -    -    -    */
  1028. /*                                    */
  1029. /*    ptrprevnotrange                            */
  1030. /*                                    */
  1031. printline("ptrprevnotrange #1",
  1032.         ptrprevnotrange(strend(ans27), ' ', '?'), ans27 + 3);
  1033.  
  1034. printline("ptrprevnotrange #2",
  1035.         ptrprevnotrange(string1 + 9, 'a', 'z'), string1 + 4);
  1036.  
  1037. /*    -    -    -    -    -    -    -    -    */
  1038. /*                                    */
  1039. /*    ptrprevnotgr                            */
  1040. /*                                    */
  1041. printline("ptrprevnotgr",
  1042.         ptrprevnotgr(ans37 + 7, "0123456789"), ans37 + 3);
  1043.  
  1044. /*    -    -    -    -    -    -    -    -    */
  1045. /*                                    */
  1046. /*    ptrprevnottextterm                        */
  1047. /*                                    */
  1048. printline("ptrprevnottextterm",
  1049.         ptrprevnottextterm(11 + "this:,. \t!,"), "s:,. \t!,");
  1050.  
  1051. /*    -    -    -    -    -    -    -    -    */
  1052. /*                                    */
  1053. /*    ptrprevnotwhite                            */
  1054. /*                                    */
  1055. printline("ptrfirstnotwhite", ptrfirstnotwhite(string2), ans09);
  1056.  
  1057. /*    -    -    -    -    -    -    -    -    */
  1058. /*                                    */
  1059. /*    ptrprevrange                            */
  1060. /*                                    */
  1061. printline("ptrprevrange #1", ptrprevrange(strend(string2), '0', '9'), string2 + 11);
  1062.  
  1063. printline("ptrprevrange #2", ptrprevrange(string4 + 9, '0', '9'), string4 + 7);
  1064.  
  1065. /*    -    -    -    -    -    -    -    -    */
  1066. /*                                    */
  1067. /*    ptrprevgr                            */
  1068. /*                                    */
  1069. printline("ptrprevgr #1", ptrprevgr(strend(string2), "0123456789"), string2 + 11);
  1070.  
  1071. printline("ptrprevgr #2", ptrprevgr(string1, ""), NULL);
  1072.  
  1073. /*    -    -    -    -    -    -    -    -    */
  1074. /*                                    */
  1075. /*    ptrprevsub                            */
  1076. /*                                    */
  1077. printline("ptrprevsub #1", ptrprevsub(strend(string6), "sub1"), string6 + 16);
  1078.  
  1079. printline("ptrprevsub #2", ptrprevsub(strend(string1), "size"), ans03);
  1080.  
  1081. /*    -    -    -    -    -    -    -    -    */
  1082. /*                                    */
  1083. /*    ptrprevsubi                            */
  1084. /*                                    */
  1085. printline("ptrprevsubi #1", ptrprevsubi(strend(string6), "SUB1"), string6 + 16);
  1086.  
  1087. printline("ptrprevsubi #2", ptrprevsubi(strend(ans21), "size"), ans21 + 10);
  1088.  
  1089. /*    -    -    -    -    -    -    -    -    */
  1090. /*                                    */
  1091. /*    ptrprevtext                            */
  1092. /*                                    */
  1093. printline("ptrprevtext", ptrprevtext(string2 + 16), string2 + 3);
  1094.  
  1095. /*    -    -    -    -    -    -    -    -    */
  1096. /*                                    */
  1097. /*    ptrprevtextterm                            */
  1098. /*                                    */
  1099. printline("ptrprevtextterm", ptrprevtextterm(string7 + 11), string7 + 5);
  1100.  
  1101. /*    -    -    -    -    -    -    -    -    */
  1102. /*                                    */
  1103. /*    ptrprevwhite                            */
  1104. /*                                    */
  1105. printline("ptrprevwhite #1", ptrprevwhite(strend(string1)), string1 + 9);
  1106.  
  1107. strcpy(work1, "abc\tother");
  1108.  
  1109. printline("ptrprevwhite #2", 1 + ptrprevwhite(strend(work1)), ans30);
  1110.  
  1111. /*    -    -    -    -    -    -    -    -    */
  1112. /*                                    */
  1113. /*    ptrprevword                            */
  1114. /*                                    */
  1115. printline("ptrprevword #1", ptrprevword(strend(string1)), ans30);
  1116.  
  1117. printline("ptrprevword #2", ptrprevword(strend(string1) - 1), string1 + 10);
  1118.  
  1119. /*    -    -    -    -    -    -    -    -    */
  1120. /*                                    */
  1121. /*    ptrthistext                            */
  1122. /*                                    */
  1123. printline("ptrthistext #1", ptrthistext(string7 + 10), string7 + 6);
  1124.  
  1125. printline("ptrthistext #2", ptrthistext(" "), NULL);
  1126.  
  1127. /*    -    -    -    -    -    -    -    -    */
  1128. /*                                    */
  1129. /*    ptrthisword                            */
  1130. /*                                    */
  1131. printline("ptrthisword #1", ptrthisword(string1 + 12), ans03);
  1132.  
  1133. printline("ptrthisword #2", ptrthisword(string1 + 10), ans03);
  1134.  
  1135. printline("ptrthisword #3", ptrthisword(string1 + 9), NULL);
  1136.  
  1137. /*    -    -    -    -    -    -    -    -    */
  1138. /*                                    */
  1139. /*    strblank                            */
  1140. /*                                    */
  1141. strcpy(work1, ans30);
  1142. strblank(work1);
  1143. printline("strblank #1", work1, "     ");
  1144.  
  1145. strcpy(work1, ans30);
  1146. printline("strblank #2", strblank(work1), "     ");
  1147.  
  1148.  
  1149. /*    -    -    -    -    -    -    -    -    */
  1150. /*                                    */
  1151. /*    strblanktotab                            */
  1152. /*                                    */
  1153. strcpy(work1, "This is         the     sample line");
  1154. strblanktotab(work1, 8);
  1155. printline("strblanktotab #1", work1, "This is\t\tthe\tsample line");
  1156.  
  1157. strcpy(work1, "This is     the     sample line");
  1158. strblanktotab(work1, 4);
  1159. printline("strblanktotab #2", work1, "This is\t\tthe\t\tsample line");
  1160.  
  1161. strcpy(work1, "This is         the     sample line");
  1162. printline("strblanktotab #1", strblanktotab(work1, 8),
  1163.             "This is\t\tthe\tsample line");
  1164.  
  1165. /*    -    -    -    -    -    -    -    -    */
  1166. /*                                    */
  1167. /*    strcenter                            */
  1168. /*                                    */
  1169. strcpy(work1, string2);
  1170. *(work1+11) = ' ';
  1171. strcenter(work1);
  1172. printline("strcenter #2", work1, ans15);
  1173.  
  1174. strcpy(work1, string2);
  1175. *(strend(work1)-1) = '\0';
  1176. strcenter(work1);
  1177. printline("strcenter #3", work1, ans16);
  1178.  
  1179. strcpy(work1, string2);
  1180. *(work1+11) = ' ';
  1181. *(strend(work1)-1) = '\0';
  1182. strcenter(work1);
  1183. printline("strcenter #4", work1, ans17);
  1184.  
  1185. strcpy(work1, string2);
  1186. printline("strcenter #5", strcenter(work1), ans14);
  1187.  
  1188. /*    -    -    -    -    -    -    -    -    */
  1189. /*                                    */
  1190. /*    strcentern                            */
  1191. /*                                    */
  1192. strcpy(work1, string2);
  1193. strcentern(work1, 12);
  1194. printline("strcentern #1", work1, ans33);
  1195.  
  1196. strcpy(work1, string2);
  1197. strcentern(work1, 13);
  1198. printline("strcentern #2", work1, ans34);
  1199.  
  1200. strcpy(work1, string2);
  1201. *(work1+11) = ' ';
  1202. strcentern(work1, 12);
  1203. printline("strcentern #3", work1, ans35);
  1204.  
  1205. strcpy(work1, string2);
  1206. *(work1+11) = ' ';
  1207. strcentern(work1, 13);
  1208. printline("strcentern #4", work1, ans36);
  1209.  
  1210. strcpy(work1, string2);
  1211. printline("strcentern #5", strcentern(work1, 12), ans33);
  1212.  
  1213. /*    -    -    -    -    -    -    -    -    */
  1214. /*                                    */
  1215. /*    strcenternew                            */
  1216. /*                                    */
  1217. strcpy(work1, string2);
  1218. strcenternew(work2, work1);
  1219. printline("strcenternew #1", work2, ans14);
  1220.  
  1221. strcpy(work1, string2);
  1222. *(work1+11) = ' ';
  1223. strcenternew(work2, work1);
  1224. printline("strcenternew #2", work2, ans15);
  1225.  
  1226. strcpy(work1, string2);
  1227. *(work1+strlen(work1)-1) = '\0';
  1228. strcenternew(work2, work1);
  1229. printline("strcenternew #3", work2, ans16);
  1230.  
  1231. strcpy(work1, string2);
  1232. *(work1+11) = ' ';
  1233. *(work1+strlen(work1)-1) = '\0';
  1234. strcenternew(work2, work1);
  1235. printline("strcenternew #4", work2, ans17);
  1236.  
  1237. strcpy(work1, string2);
  1238. printline("strcenternew #5", strcenternew(work2, work1), ans14);
  1239.  
  1240. /*    -    -    -    -    -    -    -    -    */
  1241. /*                                    */
  1242. /*    strcenternnew                            */
  1243. /*                                    */
  1244. strcenternnew(work1, string2, 12);
  1245. printline("strcenternnew #1", work1, ans33);
  1246.  
  1247. strcenternnew(work1, string2, 13);
  1248. printline("strcenternnew #2", work1, ans34);
  1249.  
  1250. strcpy(work1, string2);
  1251. *(work1+11) = ' ';
  1252. strcenternnew(work2, work1, 12);
  1253. printline("strcenternnew #3", work2, ans35);
  1254.  
  1255. strcpy(work1, string2);
  1256. *(work1+11) = ' ';
  1257. strcenternnew(work2, work1, 13);
  1258. printline("strcenternnew #4", work2, ans36);
  1259.  
  1260. printline("strcenternnew #5", strcenternnew(work1, string2, 12), ans33);
  1261.  
  1262. /*    -    -    -    -    -    -    -    -    */
  1263. /*                                    */
  1264. /*    strchecksuma                            */
  1265. /*                                    */
  1266. /*    unsigned long  strchecksuma(char *instring);            */
  1267. /*                                    */
  1268. /*    <== not done yet <==    */
  1269.  
  1270. /*    -    -    -    -    -    -    -    -    */
  1271. /*                                    */
  1272. /*    strchecksumia                            */
  1273. /*                                    */
  1274. /*    unsigned long  strchecksumia(char *instring);            */
  1275. /*                                    */
  1276. /*    <== not done yet <==    */
  1277.  
  1278. /*    -    -    -    -    -    -    -    -    */
  1279. /*                                    */
  1280. /*    strchecksumil                            */
  1281. /*                                    */
  1282. /*    unsigned char  strchecksumil(char *instring);            */
  1283. /*                                    */
  1284. /*    <== not done yet <==    */
  1285.  
  1286. /*    -    -    -    -    -    -    -    -    */
  1287. /*                                    */
  1288. /*    strchecksuml                            */
  1289. /*                                    */
  1290. /*    unsigned char  strchecksuml(char *instring);            */
  1291. /*                                    */
  1292. /*    <== not done yet <==    */
  1293.  
  1294. /*    -    -    -    -    -    -    -    -    */
  1295. /*                                    */
  1296. /*    strchrcount                            */
  1297. /*                                    */
  1298. itoa(strchrcount(string3, 's'), work1, 10);
  1299. printline("strchrcount #1", work1, "1");
  1300.  
  1301. itoa(strchrcount(string1, '-'), work1, 10);
  1302. printline("strchrcount #2", work1, "0");
  1303.  
  1304. itoa(strchrcount(ans18, '-'), work1, 10);
  1305. printline("strchrcount #3", work1, "20");
  1306.  
  1307. /*    -    -    -    -    -    -    -    -    */
  1308. /*                                    */
  1309. /*    strchrcounti                            */
  1310. /*                                    */
  1311. itoa(strchrcounti(string3, 's'), work1, 10);
  1312. printline("strchrcounti #1", work1, "3");
  1313.  
  1314. itoa(strchrcounti(string1, '-'), work1, 10);
  1315. printline("strchrcounti #2", work1, "0");
  1316.  
  1317. itoa(strchrcounti(ans18, '-'), work1, 10);
  1318. printline("strchrcounti #3", work1, "20");
  1319.  
  1320. /*    -    -    -    -    -    -    -    -    */
  1321. /*                                    */
  1322. /*    strchrdel                            */
  1323. /*                                    */
  1324. strcpy(work1, string1);
  1325. strchrdel(work1, ' ');
  1326. printline("strchrdel #1", work1, ans23);
  1327.  
  1328. strcpy(work1, string1);
  1329. printline("strchrdel #2", strchrdel(work1, ' '), ans23);
  1330.  
  1331. /*    -    -    -    -    -    -    -    -    */
  1332. /*                                    */
  1333. /*    strchrdeli                            */
  1334. /*                                    */
  1335.  
  1336. strcpy(work1, string3);
  1337. strchrdeli(work1, 's');
  1338. printline("strchrdeli #1", work1, ans43);
  1339.  
  1340. strcpy(work1, string3);
  1341. printline("strchrdeli #2", strchrdeli(work1, 's'), ans43);
  1342.  
  1343. /*    -    -    -    -    -    -    -    -    */
  1344. /*                                    */
  1345. /*    strchrdelinew                            */
  1346. /*                                    */
  1347.  
  1348. strcpy(work1, string3);
  1349. strchrdelinew(work2, work1, 's');
  1350. printline("strchrdelinew #1", work2, ans43);
  1351.  
  1352. strcpy(work1, string3);
  1353. printline("strchrdelinew #2", strchrdelinew(work2, work1, 's'), ans43);
  1354.  
  1355. /*    -    -    -    -    -    -    -    -    */
  1356. /*                                    */
  1357. /*    strchrdelnew                            */
  1358. /*                                    */
  1359. strchrdelnew(work1, string1, ' ');
  1360. printline("strchrdelnew #1", work1, ans23);
  1361.  
  1362. printline("strchrdelnew #2", strchrdelnew(work1, string1, ' '), ans23);
  1363.  
  1364. /*    -    -    -    -    -    -    -    -    */
  1365. /*                                    */
  1366. /*    strchrdelrange                            */
  1367. /*                                    */
  1368. strcpy(work1, string1);
  1369. strchrdelrange(work1,' ', 'e');
  1370. printline("strchrdelrange #1", work1, ans28);
  1371.  
  1372. strcpy(work1, string1);
  1373. printline("strchrdelrange #2", strchrdelrange(work1,' ', 'e'), ans28);
  1374.  
  1375. /*    -    -    -    -    -    -    -    -    */
  1376. /*                                    */
  1377. /*    strchrdelrangenew                        */
  1378. /*                                    */
  1379. strchrdelrangenew(work1, string1, ' ', 'e');
  1380. printline("strchrdelrangenew #1", work1, ans28);
  1381.  
  1382. printline("strchrdelrangenew #2",
  1383.         strchrdelrangenew(work1, string1, ' ', 'e'), ans28);
  1384.  
  1385. /*    -    -    -    -    -    -    -    -    */
  1386. /*                                    */
  1387. /*    strchrdelgr                            */
  1388. /*                                    */
  1389. strcpy(work1, string1);
  1390. strchrdelgr(work1, "e ");
  1391. printline("strchrdelgr #1", work1, ans24);
  1392.  
  1393. strcpy(work1, string1);
  1394. printline("strchrdelgr #2", strchrdelgr(work1, "e "), ans24);
  1395.  
  1396. /*    -    -    -    -    -    -    -    -    */
  1397. /*                                    */
  1398. /*    strchrdelgrnew                            */
  1399. /*                                    */
  1400. strchrdelgrnew(work1, string1, "e ");
  1401. printline("strchrdelgrnew #1", work1, ans24);
  1402.  
  1403. printline("strchrdelgrnew #2",
  1404.             strchrdelgrnew(work1, string1, "e "), ans24);
  1405.  
  1406. /*    -    -    -    -    -    -    -    -    */
  1407. /*                                    */
  1408. /*    strchrfromc                            */
  1409. /*                                    */
  1410. strcpy(work1, "\\\\");
  1411. tempc = strchrfromc(&tempi, work1);
  1412. itoa(tempi, work2, 10);
  1413. tempp = strend(work2);
  1414. tempp[0] = tempc;
  1415. tempp[1] = EOS;
  1416. printline("strchrfromc #1", work2, "2\\");
  1417.  
  1418. strcpy(work1, "\\t");
  1419. tempc = strchrfromc(&tempi, work1);
  1420. itoa(tempi, work2, 10);
  1421. tempp = strend(work2);
  1422. tempp[0] = tempc;
  1423. tempp[1] = EOS;
  1424. printline("strchrfromc #2", work2, "2\t");
  1425.  
  1426. /*    -    -    -    -    -    -    -    -    */
  1427. /*                                    */
  1428. /*    strchrrpl                            */
  1429. /*                                    */
  1430. strcpy(work1, string2);
  1431. strchrrpl(work1, ' ', '-');
  1432. printline("strchrrpl #1", work1, ans29);
  1433.  
  1434. strcpy(work1, string2);
  1435. printline("strchrrpl #2", strchrrpl(work1, ' ', '-'), ans29);
  1436.  
  1437. /*    -    -    -    -    -    -    -    -    */
  1438. /*                                    */
  1439. /*    strchrrpli                            */
  1440. /*                                    */
  1441. strcpy(work1, string3);
  1442. strchrrpli(work1, 'S', '-');
  1443. printline("strchrrpli #1", work1, ans44);
  1444.  
  1445. strcpy(work1, string3);
  1446. printline("strchrrpli #2", strchrrpli(work1, 'S', '-'), ans44);
  1447.  
  1448. /*    -    -    -    -    -    -    -    -    */
  1449. /*                                    */
  1450. /*    strchrrplinew                            */
  1451. /*                                    */
  1452. strcpy(work1, string3);
  1453. strchrrplinew(work2, work1, 'S', '-');
  1454. printline("strchrrplinew #1", work2, ans44);
  1455.  
  1456. strcpy(work1, string3);
  1457. printline("strchrrplinew #2",
  1458.         strchrrplinew(work2, work1, 'S', '-'), ans44);
  1459.  
  1460. /*    -    -    -    -    -    -    -    -    */
  1461. /*                                    */
  1462. /*    strchrrplnew                            */
  1463. /*                                    */
  1464. strchrrplnew(work1, string2, ' ', '-');
  1465. printline("strchrrplnew #1", work1, ans29);
  1466.  
  1467. printline("strchrrplnew #2", strchrrplnew(work1, string2, ' ', '-'), ans29);
  1468.  
  1469. /*    -    -    -    -    -    -    -    -    */
  1470. /*                                    */
  1471. /*    strchrtoc                            */
  1472. /*                                    */
  1473. strcpy(work1, "\5\t\142");
  1474. strtoc(work1, "\5");
  1475. strtoc(work2, "\t");
  1476. strtoc(work3, "\142");
  1477. work4[0] = EOS;
  1478. strxcat(work4, work1, work2, work3, NULL);
  1479. printline("strchrtoc", work4, "\\x05\\tb");
  1480.  
  1481. /*    -    -    -    -    -    -    -    -    */
  1482. /*                                    */
  1483. /*    strcode1                            */
  1484. /*                                    */
  1485. /*    char *strcode1 (char *instring,    char *codestring);        */
  1486. /*                                    */
  1487. strcpy(work1,"EXAMPLE CODING STRING");
  1488. strcpy(work2, "sample string to en/decode");
  1489. strcode1(work2, work1);
  1490. printline("strcode1 #1", work2, "69,=<)eS7=-')gT<t7'a# ;.)5");
  1491. strcode1(work2, work1);
  1492. printline("strcode1 #2", work2, "sample string to en/decode");
  1493.  
  1494. /*    -    -    -    -    -    -    -    -    */
  1495. /*                                    */
  1496. /*    strcode2                            */
  1497. /*                                    */
  1498. /*    char *strcode2(char *instring);                    */
  1499. /*                                    */
  1500. strcpy(work2, "sample string to en/decode");
  1501. strcode2(work2);
  1502. work1[0] = work2[1];            /* just check a couple        */
  1503. work1[1] = work2[3];            /*   of converted characters    */
  1504. work1[2] = EOS;
  1505. printline("strcode2 #1", work1, "7P");
  1506. strcode2(work2);        /* this re-convert is the real test    */
  1507. printline("strcode2 #2", work2, "sample string to en/decode");
  1508.  
  1509.  
  1510. /*    -    -    -    -    -    -    -    -    */
  1511. /*                                    */
  1512. /*    strcomma                            */
  1513. /*                                    */
  1514. strcpy(work3, string2);
  1515.  
  1516. strcpy(work1, work3);
  1517. strcomma(work1);
  1518. printline("strcomma #1", work1, ans37);
  1519.  
  1520. strcpy(work1, work3);
  1521. *(work1+11) = ' ';
  1522. strcomma(work1);
  1523. printline("strcomma #2", work1, ans38);
  1524.  
  1525. strcpy(work1, work3);
  1526. *(work1+11) = ' ';
  1527. *(work1+10) = ' ';
  1528. strcomma(work1);
  1529. printline("strcomma #3", work1, ans39);
  1530.  
  1531. /*    -    -    -    -    -    -    -    -    */
  1532. /*                                    */
  1533. /*    strcommaf                            */
  1534. /*                                    */
  1535. strcpy(work1, string4);
  1536. strcommaf(work1);
  1537. printline("strcommaf #1", work1, "12,345.678");
  1538.  
  1539. strcpy(work1, string4);
  1540. printline("strcommaf #2", strcommaf(work1), "12,345.678");
  1541.  
  1542. /*    -    -    -    -    -    -    -    -    */
  1543. /*                                    */
  1544. /*    strcommafnew                            */
  1545. /*                                    */
  1546. strcpy(work1, string4);
  1547. strcommafnew(work2, work1);
  1548. printline("strcommafnew #1", work2, "12,345.678");
  1549.  
  1550. strcpy(work1, string4);
  1551. printline("strcommafnew #2", strcommafnew(work2, work1), "12,345.678");
  1552.  
  1553. /*    -    -    -    -    -    -    -    -    */
  1554. /*                                    */
  1555. /*    strcommafri                            */
  1556. /*                                    */
  1557. strcommafri(work1, 1234);
  1558. printline("strcommafri #1", work1, "1,234");
  1559.  
  1560. strcommafri(work1, -1234);
  1561. printline("strcommafri #2", work1, "-1,234");
  1562.  
  1563.  
  1564. printline("strcommafri #3", strcommafri(work1, 1234), "1,234");
  1565.  
  1566. /*    -    -    -    -    -    -    -    -    */
  1567. /*                                    */
  1568. /*    strcommafrl                            */
  1569. /*                                    */
  1570. strcommafrl(work1, 123456789L);
  1571. printline("strcommafrl #1", work1, ans37);
  1572.  
  1573. strcommafrl(work1, -123456789L);
  1574. printline("strcommafrl #2", work1, "-123,456,789");
  1575.  
  1576. printline("strcommafrl #3", strcommafrl(work1, 123456789L), ans37);
  1577.  
  1578. /*    -    -    -    -    -    -    -    -    */
  1579. /*                                    */
  1580. /*    strcommafrui                            */
  1581. /*                                    */
  1582. strcommafrui(work1, (unsigned)60000L);
  1583. printline("strcommafrui #1", work1, "60,000");
  1584.  
  1585. printline("strcommafrui #2", strcommafrui(work1, (unsigned)60000L), "60,000");
  1586.  
  1587. /*    -    -    -    -    -    -    -    -    */
  1588. /*                                    */
  1589. /*    strcommafrul                            */
  1590. /*                                    */
  1591. strcommafrul(work1, 4000000000L);
  1592. printline("strcommafrul #1", work1, "4,000,000,000");
  1593.  
  1594. printline("strcommafrul #2",
  1595.         strcommafrul(work1, 4000000000L), "4,000,000,000");
  1596.  
  1597. /*    -    -    -    -    -    -    -    -    */
  1598. /*                                    */
  1599. /*    strcomman                            */
  1600. /*                                    */
  1601. strcpy(work1, string2);
  1602. strcomman(work1, 14);
  1603. printline("strcomman #1", work1, ans42);
  1604.  
  1605. strcpy(work1, string2);
  1606. printline("strcomman #2", strcomman(work1, 14), ans42);
  1607.  
  1608. /*    -    -    -    -    -    -    -    -    */
  1609. /*                                    */
  1610. /*    strcommanew                            */
  1611. /*                                    */
  1612. strcpy(work1, string2);
  1613. strcommanew(work2, work1);
  1614. printline("strcommanew #1", work2, ans37);
  1615.  
  1616. strcpy(work1, string2);
  1617. *(work1+11) = ' ';
  1618. strcommanew(work2, work1);
  1619. printline("strcommanew #2", work2, ans38);
  1620.  
  1621. strcpy(work1, string2);
  1622. *(work1+11) = ' ';
  1623. *(work1+10) = ' ';
  1624. strcommanew(work2, work1);
  1625. printline("strcommanew #3", work2, ans39);
  1626.  
  1627. strcpy(work1, string2);
  1628. printline("strcommanew #4", strcommanew(work2, work1), ans37);
  1629.  
  1630. /*    -    -    -    -    -    -    -    -    */
  1631. /*                                    */
  1632. /*    strcommannew                            */
  1633. /*                                    */
  1634. strcpy(work1, string2);
  1635. strcommannew(work2, work1, 14);
  1636. printline("strcommannew #1", work2, ans42);
  1637.  
  1638. strcpy(work1, string2);
  1639. printline("strcommannew #2", strcommannew(work2, work1, 14), ans42);
  1640.  
  1641. /*    -    -    -    -    -    -    -    -    */
  1642. /*                                    */
  1643. /*    strcommatoi                            */
  1644. /*                                    */
  1645. strcpy(work1, ans39 + 4);
  1646. itoa(strcommatoi(work1), work2, 10);
  1647. printline("strcommatoi #1", work2, "4567");
  1648.  
  1649. strcpy(work1, "-1,234");
  1650. itoa(strcommatoi(work1), work2, 10);
  1651. printline("strcommatoi #2", work2, "-1234");
  1652.  
  1653. /*    -    -    -    -    -    -    -    -    */
  1654. /*                                    */
  1655. /*    strcommatol                            */
  1656. /*                                    */
  1657. strcpy(work1, "2,000,000,000");
  1658. ltoa(strcommatol(work1), work2, 10);
  1659. printline("strcommatol #1", work2, "2000000000");
  1660.  
  1661. strcpy(work1, "-2,000,000,000");
  1662. ltoa(strcommatol(work1), work2, 10);
  1663. printline("strcommatol #2", work2, "-2000000000");
  1664.  
  1665. /*    -    -    -    -    -    -    -    -    */
  1666. /*                                    */
  1667. /*    strcommatoui                            */
  1668. /*                                    */
  1669. strcpy(work1, "60,000");
  1670. ltoa(strcommatoui(work1), work2, 10);
  1671. printline("strcommatoui", work2, "60000");
  1672.  
  1673. /*    -    -    -    -    -    -    -    -    */
  1674. /*                                    */
  1675. /*    strcommatoul                            */
  1676. /*                                    */
  1677. strcpy(work1, "4,000,000,000");
  1678. ultoa(strcommatoul(work1), work2, 10);
  1679. printline("strcommatoul", work2, "4000000000");
  1680.  
  1681. /*    -    -    -    -    -    -    -    -    */
  1682. /*                                    */
  1683. /*    strdelwhite                            */
  1684. /*                                    */
  1685. strcpy(work1, string1);
  1686. printline("strdelwhite", strdelwhite(work1), ans23);
  1687.  
  1688. /*    -    -    -    -    -    -    -    -    */
  1689. /*                                    */
  1690. /*    strend                                */
  1691. /*                                    */
  1692. printline("strend", strend(string1)-5, ans30);
  1693.  
  1694. /*    -    -    -    -    -    -    -    -    */
  1695. /*                                    */
  1696. /*    streos                                */
  1697. /*                                    */
  1698. strcpy(work1, string1);
  1699. printline("streos #1", streos(work1), work1);
  1700. for (ii = 0; ii < strlen(string1); ii++)
  1701.   if (work1[ii] != EOS)
  1702.     break;
  1703. if (ii == strlen(string1))
  1704.   strcpy(work1, "good");
  1705. else
  1706.   strcpy(work1, "bad");
  1707. printline("streos #2", work1, "good");
  1708.  
  1709. /*    -    -    -    -    -    -    -    -    */
  1710. /*                                    */
  1711. /*    strfromc                            */
  1712. /*                                    */
  1713. strcpy(work1, "a\\t\\142");
  1714. strfromc(work1);
  1715. printline("strfromc", work1, "a\tb");
  1716.  
  1717. /*    -    -    -    -    -    -    -    -    */
  1718. /*                                    */
  1719. /*    strindex                            */
  1720. /*                                    */
  1721. itoa(strindex(string1+15, string1), work1, 10);
  1722. printline("strindex", work1, "15");
  1723.  
  1724. /*    -    -    -    -    -    -    -    -    */
  1725. /*                                    */
  1726. /*    strinsert                            */
  1727. /*                                    */
  1728. strcpy(work1, string1 + 9);
  1729. printline("strinsert #1", strinsert(work1, 0, "time date"), string1);
  1730.  
  1731. strcpy(work1, string1);
  1732. strset(work1 + 10, '-');
  1733. work1[10] = EOS;
  1734. strinsert(work1, strlen(work1), "size other");
  1735. printline("strinsert #2", work1, string1);
  1736.  
  1737. /*    -    -    -    -    -    -    -    -    */
  1738. /*                                    */
  1739. /*    strinsertnew                            */
  1740. /*                                    */
  1741. strcpy(work1, string1 + 9);
  1742. printline("strinsertnew #1", strinsertnew(work2, work1, 0, "time date"), string1);
  1743.  
  1744. strcpy(work1, string1);
  1745. strset(work1 + 10, '-');
  1746. work1[10] = EOS;
  1747. strinsertnew(work2, work1, strlen(work2), "size other");
  1748. printline("strinsertnew #2", work2, string1);
  1749.  
  1750.  
  1751. /*    -    -    -    -    -    -    -    -    */
  1752. /*                                    */
  1753. /*    strisempty                            */
  1754. /*                                    */
  1755. work1[0] = EOS;
  1756. tempi = strisempty(work1);
  1757. printline("strisempty #1", itoa(tempi, work2, 10), "1");
  1758.  
  1759. work1[0] = '\n';
  1760. work1[1] = EOS;
  1761. tempi = strisempty(work1);
  1762. printline("strisempty #2", itoa(tempi, work2, 10), "1");
  1763.  
  1764. strcpy(work1, "    ");
  1765. tempi = strisempty(work1);
  1766. printline("strisempty #3", itoa(tempi, work2, 10), "1");
  1767.  
  1768. tempi = strisempty(string1);
  1769. printline("strisempty #4", itoa(tempi, work2, 10), "0");
  1770.  
  1771. /*    -    -    -    -    -    -    -    -    */
  1772. /*                                    */
  1773. /*    striswhite                            */
  1774. /*                                    */
  1775. tempi = striswhite("    \t   ");
  1776. printline("striswhite #1", itoa(tempi, work2, 10), "1");
  1777.  
  1778. tempi = striswhite("\n");
  1779. printline("striswhite #2", itoa(tempi, work2, 10), "0");
  1780.  
  1781.  
  1782. /*    -    -    -    -    -    -    -    -    */
  1783. /*                                    */
  1784. /*    strleft                                */
  1785. /*                                    */
  1786. strcpy(work1, string1);
  1787. strleft(work1, 9);
  1788. printline("strleft #1", work1, ans02);
  1789.  
  1790. strcpy(work1, string1);
  1791. strleft(work1, 99);
  1792. printline("strleft #2", work1, string1);
  1793.  
  1794.  
  1795. /*    -    -    -    -    -    -    -    -    */
  1796. /*                                    */
  1797. /*    strleftnew                            */
  1798. /*                                    */
  1799. strcpy(work2, "");
  1800. strleftnew(work2, string1, 9);
  1801. printline("strleftnew #1", work2, ans02);
  1802.  
  1803. strcpy(work2, "");
  1804. strleftnew(work2, string1, 99);
  1805. printline("strleftnew #2", work2, string1);
  1806.  
  1807. /*    -    -    -    -    -    -    -    -    */
  1808. /*                                    */
  1809. /*    strlenmax                            */
  1810. /*                                    */
  1811. tempi = strlenmax(string1, 50);
  1812. printline("strlenmax #1", itoa(tempi, work1, 10), "50");
  1813.  
  1814. tempi = strlenmax(string1, 10);
  1815. printline("strlenmax #2", itoa(tempi, work1, 10), "20");
  1816.  
  1817. /*    -    -    -    -    -    -    -    -    */
  1818. /*                                    */
  1819. /*    strlenmin                            */
  1820. /*                                    */
  1821. tempi = strlenmin(string1, 50);
  1822. printline("strlenmin #1", itoa(tempi, work1, 10), "20");
  1823.  
  1824. tempi = strlenmin(string1, 10);
  1825. printline("strlenmin #2", itoa(tempi, work1, 10), "10");
  1826.  
  1827. /*    -    -    -    -    -    -    -    -    */
  1828. /*                                    */
  1829. /*    strlfdel                            */
  1830. /*                                    */
  1831. strcpy(work1, string1);
  1832. strlfdel(work1, 10);
  1833. printline("strlfdel #1", work1, ans03);
  1834.  
  1835. strcpy(work1, string1);
  1836. strlfdel(work1, 99);
  1837. printline("strlfdel #2", work1, "");
  1838.  
  1839. strcpy(work1, string1);
  1840. printline("strlfdel #3", strlfdel(work1, 10), ans03);
  1841.  
  1842. /*    -    -    -    -    -    -    -    -    */
  1843. /*                                    */
  1844. /*    strlfdelnew                            */
  1845. /*                                    */
  1846. strcpy(work1, string1);
  1847. strlfdelnew(work2, work1, 10);
  1848. printline("strlfdelnew #1", work2, ans03);
  1849.  
  1850. strcpy(work1, string1);
  1851. strlfdelnew(work2, work1, 99);
  1852. printline("strlfdelnew #2", work2, "");
  1853.  
  1854. strcpy(work1, string1);
  1855. printline("strlfdelnew #3", strlfdelnew(work2, work1, 10), ans03);
  1856.  
  1857. /*    -    -    -    -    -    -    -    -    */
  1858. /*                                    */
  1859. /*    strlfset                            */
  1860. /*                                    */
  1861. strcpy(work1, string1);
  1862. strlfset(work1, 4, '-');
  1863. printline("strlfset #1", work1, ans19);
  1864.  
  1865. strcpy(work1, string1);
  1866. strlfset(work1, 99, '-');
  1867. printline("strlfset #2", work1, ans18);
  1868.  
  1869. strcpy(work1, string1);
  1870. printline("strlfset #3", strlfset(work1, 4, '-'), ans19);
  1871.  
  1872. /*    -    -    -    -    -    -    -    -    */
  1873. /*                                    */
  1874. /*    strlfsetnew                            */
  1875. /*                                    */
  1876. strlfsetnew(work1, string1, 4, '-');
  1877. printline("strlfsetnew #1", work1, ans19);
  1878.  
  1879. strlfsetnew(work1, string1, 99, '-');
  1880. printline("strlfsetnew #2", work1, ans18);
  1881.  
  1882. printline("strlfsetnew #3", strlfsetnew(work1, string1, 4, '-'), ans19);
  1883.  
  1884. /*    -    -    -    -    -    -    -    -    */
  1885. /*                                    */
  1886. /*    strlfjust                            */
  1887. /*                                    */
  1888. strcpy(work1, string2);
  1889. strlfjust(work1);
  1890. printline("strlfjust #1", work1, ans07);
  1891.  
  1892. strcpy(work1, string2);
  1893. printline("strlfjust #2", strlfjust(work1), ans07);
  1894.  
  1895. /*    -    -    -    -    -    -    -    -    */
  1896. /*                                    */
  1897. /*    strlfjustnew                            */
  1898. /*                                    */
  1899. strcpy(work2,"");
  1900. strlfjustnew(work2, string2);
  1901. printline("strlfjustnew #1", work2, ans07);
  1902.  
  1903. strcpy(work2,"");
  1904. printline("strlfjustnew #2", strlfjustnew(work2, string2), ans07);
  1905.  
  1906. /*    -    -    -    -    -    -    -    -    */
  1907. /*                                    */
  1908. /*    strlfpad                            */
  1909. /*                                    */
  1910. strtrimnew(work1, string2);
  1911. strlfpad(work1, 3, '-');
  1912. printline("strlfpad #1", work1, ans12);
  1913.  
  1914. strtrimnew(work1, string2);
  1915. printline("strlfpad #2", strlfpad(work1, 3, '-'), ans12);
  1916.  
  1917. /*    -    -    -    -    -    -    -    -    */
  1918. /*                                    */
  1919. /*    strlfpadnew                            */
  1920. /*                                    */
  1921. strtrimnew(work1, string2);
  1922. strlfpadnew(work2, work1, 3, '-');
  1923. printline("strlfpadnew #1", work2, ans12);
  1924.  
  1925. strtrimnew(work1, string2);
  1926. printline("strlfpadnew #2", strlfpadnew(work2, work1, 3, '-'), ans12);
  1927.  
  1928. /*    -    -    -    -    -    -    -    -    */
  1929. /*                                    */
  1930. /*    strlfrot                            */
  1931. /*                                    */
  1932. strcpy(work1, string1);
  1933. strlfrot(work1, 10);
  1934. printline("strlfrot #1", work1, ans08);
  1935.  
  1936. strcpy(work1, string1);
  1937. printline("strlfrot #2", strlfrot(work1, 10), ans08);
  1938.  
  1939. /*    -    -    -    -    -    -    -    -    */
  1940. /*                                    */
  1941. /*    strlfrotnew                            */
  1942. /*                                    */
  1943. strcpy(work1, string1);
  1944. strlfrotnew(work2, work1, 10);
  1945. printline("strlfrotnew #1", work2, ans08);
  1946.  
  1947. strcpy(work1, string1);
  1948. printline("strlfrotnew #2", strlfrotnew(work2, work1, 10), ans08);
  1949.  
  1950. /*    -    -    -    -    -    -    -    -    */
  1951. /*                                    */
  1952. /*    strlfsh                                */
  1953. /*                                    */
  1954. strcpy(work1, string1);
  1955. strlfsh(work1, 10);
  1956. printline("strlfsh #1", work1, ans05);
  1957.  
  1958. strcpy(work1, string1);
  1959. printline("strlfsh #2", strlfsh(work1, 10), ans05);
  1960.  
  1961. /*    -    -    -    -    -    -    -    -    */
  1962. /*                                    */
  1963. /*    strlfshnew                            */
  1964. /*                                    */
  1965. strcpy(work1, string1);
  1966. strlfshnew(work2, work1, 10);
  1967. printline("strlfshnew #1", work2, ans05);
  1968.  
  1969. strcpy(work1, string1);
  1970. printline("strlfshnew #2", strlfshnew(work2, work1, 10), ans05);
  1971.  
  1972. /*    -    -    -    -    -    -    -    -    */
  1973. /*                                    */
  1974. /*    strlfsize                            */
  1975. /*                                    */
  1976. strcpy(work1, string1);
  1977. strlfsize(work1, 10);
  1978. printline("strlfsize #1", work1, ans03);
  1979.  
  1980. strlfsize(work1, 20);
  1981. printline("strlfsize #2", work1, ans40);
  1982.  
  1983. strcpy(work1, string1);
  1984. printline("strlfsize #3", strlfsize(work1, 10), ans03);
  1985.  
  1986. /*    -    -    -    -    -    -    -    -    */
  1987. /*                                    */
  1988. /*    strlfsizenew                            */
  1989. /*                                    */
  1990. strlfsizenew(work1, string1, 10);
  1991. printline("strlfsizenew #1", work1, ans03);
  1992.  
  1993. strlfsizenew(work2, work1, 20);
  1994. printline("strlfsizenew #2", work2, ans40);
  1995.  
  1996. printline("strlfsizenew #3", strlfsizenew(work1, string1, 10), ans03);
  1997.  
  1998. /*    -    -    -    -    -    -    -    -    */
  1999. /*                                    */
  2000. /*    strlftrim                            */
  2001. /*                                    */
  2002. strcpy(work1, string2);
  2003. strlftrim(work1);
  2004. printline("strlftrim #1", work1, ans09);
  2005.  
  2006. strcpy(work1, string2);
  2007. printline("strlftrim #2", strlftrim(work1), ans09);
  2008.  
  2009. /*    -    -    -    -    -    -    -    -    */
  2010. /*                                    */
  2011. /*    strlftrimnew                            */
  2012. /*                                    */
  2013. strcpy(work1, string2);
  2014. strlftrimnew(work2, work1);
  2015. printline("strlftrimnew #1", work2, ans09);
  2016.  
  2017. strcpy(work1, string2);
  2018. printline("strlftrimnew #2", strlftrimnew(work2, work1), ans09);
  2019.  
  2020. /*    -    -    -    -    -    -    -    -    */
  2021. /*                                    */
  2022. /*    strmid                                */
  2023. /*                                    */
  2024. strcpy(work1, string1);
  2025. strmid(work1, 5);
  2026. printline("strmid #1", work1, ans01);
  2027.  
  2028. strcpy(work1, string1);
  2029. strmid(work1, 55);
  2030. printline("strmid #2", work1, "");
  2031.  
  2032. strcpy(work1, string1);
  2033. printline("strmid #3", strmid(work1, 5), ans01);
  2034.  
  2035. /*    -    -    -    -    -    -    -    -    */
  2036. /*                                    */
  2037. /*    strmiddel                            */
  2038. /*                                    */
  2039. strcpy(work1, string1);
  2040. strmiddel(work1, 5, 5);
  2041. printline("strmiddel #1", work1, ans22);
  2042.  
  2043. strcpy(work1, string1);
  2044. strmiddel(work1, 9, 99);
  2045. printline("strmiddel #2", work1, ans02);
  2046.  
  2047. strcpy(work1, string1);
  2048. strmiddel(work1, 99, 5);
  2049. printline("strmiddel #3", work1, string1);
  2050.  
  2051. strcpy(work1, string1);
  2052. printline("strmiddel #4", strmiddel(work1, 5, 5), ans22);
  2053.  
  2054. /*    -    -    -    -    -    -    -    -    */
  2055. /*                                    */
  2056. /*    strmiddelnew                            */
  2057. /*                                    */
  2058. strmiddelnew(work1, string1, 5, 5);
  2059. printline("strmiddelnew #1", work1, ans22);
  2060.  
  2061. strmiddelnew(work1, string1, 9, 99);
  2062. printline("strmiddelnew #2", work1, ans02);
  2063.  
  2064. strmiddelnew(work1, string1, 99, 5);
  2065. printline("strmiddelnew #3", work1, string1);
  2066.  
  2067. printline("strmiddelnew #4", strmiddelnew(work1, string1, 5, 5), ans22);
  2068.  
  2069. /*    -    -    -    -    -    -    -    -    */
  2070. /*                                    */
  2071. /*    strmidset                            */
  2072. /*                                    */
  2073. strcpy(work1, string1);
  2074. strmidset(work1, 4, 6, '-');
  2075. printline("strmidset #1", work1, ans26);
  2076.  
  2077. strcpy(work1, string1);
  2078. printline("strmidset #2", strmidset(work1, 4, 6, '-'), ans26);
  2079.  
  2080. /*    -    -    -    -    -    -    -    -    */
  2081. /*                                    */
  2082. /*    strmidsetnew                            */
  2083. /*                                    */
  2084. strcpy(work1, string1);
  2085. strmidsetnew(work2, work1, 4, 6, '-');
  2086. printline("strmidsetnew #1", work2, ans26);
  2087.  
  2088. strcpy(work1, string1);
  2089. printline("strmidsetnew #2", strmidsetnew(work2, work1, 4, 6, '-'), ans26);
  2090.  
  2091. /*    -    -    -    -    -    -    -    -    */
  2092. /*                                    */
  2093. /*    strmidn                                */
  2094. /*                                    */
  2095. strcpy(work1, string1);
  2096. strmidn(work1, 5, 4);
  2097. printline("strmidn #1", work1, "date");
  2098.  
  2099. strcpy(work1, string1);
  2100. printline("strmidn #2", strmidn(work1, 5, 4), "date");
  2101.  
  2102. /*    -    -    -    -    -    -    -    -    */
  2103. /*                                    */
  2104. /*    strmidnew                            */
  2105. /*                                    */
  2106. strmidnew(work2, string1, 5);
  2107. printline("strmidnew #1", work2, ans01);
  2108.  
  2109. strmidnew(work2, string1, 55);
  2110. printline("strmidnew #2", work2, "");
  2111.  
  2112. printline("strmidnew #3", strmidnew(work2, string1, 5), ans01);
  2113.  
  2114. /*    -    -    -    -    -    -    -    -    */
  2115. /*                                    */
  2116. /*    strmidnnew                            */
  2117. /*                                    */
  2118. strcpy(work1, string1);
  2119. strmidnnew(work2,work1, 5, 4);
  2120. printline("strmidnnew #1", work2, "date");
  2121.  
  2122. strcpy(work1, string1);
  2123. printline("strmidnnew #2", strmidnnew(work2, work1, 5, 4), "date");
  2124.  
  2125. /*    -    -    -    -    -    -    -    -    */
  2126. /*                                    */
  2127. /*    strmidpad                            */
  2128. /*                                    */
  2129. strcpy(work1, string1);
  2130. strmiddel(work1, 4, 6);
  2131. strmidpad(work1, 4, 3, '-');
  2132. printline("strmidpad #1", work1, ans32);
  2133.  
  2134. strcpy(work1, string1);
  2135. strmiddel(work1, 4, 6);
  2136. printline("strmidpad #2", strmidpad(work1, 4, 3, '-'), ans32);
  2137.  
  2138. /*    -    -    -    -    -    -    -    -    */
  2139. /*                                    */
  2140. /*    strmidpadnew                            */
  2141. /*                                    */
  2142. strcpy(work1, string1);
  2143. strmiddel(work1, 4, 6);
  2144. strmidpadnew(work2, work1, 4, 3, '-');
  2145. printline("strmidpadnew #1", work2, ans32);
  2146.  
  2147. strcpy(work1, string1);
  2148. strmiddel(work1, 4, 6);
  2149. printline("strmidpadnew #2", strmidpadnew(work2, work1, 4, 3, '-'), ans32);
  2150.  
  2151. /*    -    -    -    -    -    -    -    -    */
  2152. /*                                    */
  2153. /*    strrepeat                            */
  2154. /*                                    */
  2155. strrepeat(work1, "this ", 3);
  2156. printline("strrepeat", work1, "this this this ");
  2157.  
  2158. /*    -    -    -    -    -    -    -    -    */
  2159. /*                                    */
  2160. /*    strrepeatn                            */
  2161. /*                                    */
  2162. strrepeatn(work1, "this is ", 6, 20);
  2163. printline("strrepeat", work1, "this is this is this");
  2164.  
  2165. /*    -    -    -    -    -    -    -    -    */
  2166. /*                                    */
  2167. /*    strreverse                            */
  2168. /*                                    */
  2169. strcpy(work1, string1);
  2170. strreverse(work1);
  2171. printline("strreverse #1", work1, ans25);
  2172.  
  2173. strcpy(work1, string1);
  2174. printline("strreverse #2", strreverse(work1), ans25);
  2175.  
  2176. /*    -    -    -    -    -    -    -    -    */
  2177. /*                                    */
  2178. /*    strreversenew                            */
  2179. /*                                    */
  2180. strreversenew(work1, string1);
  2181. printline("strreversenew #1", work1, ans25);
  2182.  
  2183. printline("strreversenew #1", strreversenew(work1, string1), ans25);
  2184.  
  2185. /*    -    -    -    -    -    -    -    -    */
  2186. /*                                    */
  2187. /*    strright                            */
  2188. /*                                    */
  2189. strcpy(work1, string1);
  2190. strright(work1, 10);
  2191. printline("strright #1", work1, ans03);
  2192.  
  2193. strcpy(work1, string1);
  2194. strright(work1, 99);
  2195. printline("strright #2", work1, string1);
  2196.  
  2197. strcpy(work1, string1);
  2198. printline("strright #3", strright(work1, 10), ans03);
  2199.  
  2200. /*    -    -    -    -    -    -    -    -    */
  2201. /*                                    */
  2202. /*    strrightnew                            */
  2203. /*                                    */
  2204. strcpy(work2,"");
  2205. strrightnew(work2, string1, 10);
  2206. printline("strrightnew #1", work2, ans03);
  2207.  
  2208. strcpy(work2,"");
  2209. strrightnew(work2, string1, 99);
  2210. printline("strrightnew #2", work2, string1);
  2211.  
  2212. strcpy(work2,"");
  2213. printline("strrightnew #3", strrightnew(work2, string1, 10), ans03);
  2214.  
  2215. /*    -    -    -    -    -    -    -    -    */
  2216. /*                                    */
  2217. /*    strrtdel                            */
  2218. /*                                    */
  2219. strcpy(work1, string1);
  2220. strrtdel(work1, 11);
  2221. printline("strrtdel #1", work1, ans02);
  2222.  
  2223. strcpy(work1, string1);
  2224. strrtdel(work1, 99);
  2225. printline("strrtdel #2", work1, "");
  2226.  
  2227. strcpy(work1, string1);
  2228. printline("strrtdel #3", strrtdel(work1, 11), ans02);
  2229.  
  2230. /*    -    -    -    -    -    -    -    -    */
  2231. /*                                    */
  2232. /*    strrtdelnew                            */
  2233. /*                                    */
  2234. strcpy(work1, string1);
  2235. strrtdelnew(work2, work1, 11);
  2236. printline("strrtdelnew #1", work2, ans02);
  2237.  
  2238. strcpy(work1, string1);
  2239. strrtdelnew(work2, work1, 99);
  2240. printline("strrtdelnew #2", work2, "");
  2241.  
  2242. strcpy(work1, string1);
  2243. printline("strrtdelnew #3", strrtdelnew(work2, work1, 11), ans02);
  2244.  
  2245. /*    -    -    -    -    -    -    -    -    */
  2246. /*                                    */
  2247. /*    strrtset                            */
  2248. /*                                    */
  2249. strcpy(work1, string1);
  2250. strrtset(work1, 5, '-');
  2251. printline("strrtset #1", work1, ans20);
  2252.  
  2253. strcpy(work1, string1);
  2254. strrtset(work1, 99, '-');
  2255. printline("strrtset #2", work1, ans18);
  2256.  
  2257. strcpy(work1, string1);
  2258. printline("strrtset #3", strrtset(work1, 5, '-'), ans20);
  2259.  
  2260. /*    -    -    -    -    -    -    -    -    */
  2261. /*                                    */
  2262. /*    strrtsetnew                            */
  2263. /*                                    */
  2264. strrtsetnew(work1, string1, 5, '-');
  2265. printline("strrtsetnew #1", work1, ans20);
  2266.  
  2267. strrtsetnew(work1, string1, 99, '-');
  2268. printline("strrtsetnew #2", work1, ans18);
  2269.  
  2270. printline("strrtsetnew #3", strrtsetnew(work1, string1, 5, '-'), ans20);
  2271.  
  2272. /*    -    -    -    -    -    -    -    -    */
  2273. /*                                    */
  2274. /*    strrtjust                            */
  2275. /*                                    */
  2276. strcpy(work1, string2);
  2277. strrtjust(work1);
  2278. printline("strrtjust #1", work1, ans06);
  2279.  
  2280. strcpy(work1, string2);
  2281. printline("strrtjust #2", strrtjust(work1), ans06);
  2282.  
  2283. /*    -    -    -    -    -    -    -    -    */
  2284. /*                                    */
  2285. /*    strrtjustnew                            */
  2286. /*                                    */
  2287. strcpy(work2, "");
  2288. strrtjustnew(work2, string2);
  2289. printline("strrtjustnew #1", work2, ans06);
  2290.  
  2291. strcpy(work2, "");
  2292. printline("strrtjustnew #2", strrtjustnew(work2, string2), ans06);
  2293.  
  2294. /*    -    -    -    -    -    -    -    -    */
  2295. /*                                    */
  2296. /*    strrtpad                            */
  2297. /*                                    */
  2298. strtrimnew(work1, string2);
  2299. strrtpad(work1, 3, '-');
  2300. printline("strrtpad #1", work1, ans13);
  2301.  
  2302. strtrimnew(work1, string2);
  2303. printline("strrtpad #2", strrtpad(work1, 3, '-'), ans13);
  2304.  
  2305. /*    -    -    -    -    -    -    -    -    */
  2306. /*                                    */
  2307. /*    strrtpadnew                            */
  2308. /*                                    */
  2309. strtrimnew(work1, string2);
  2310. strrtpadnew(work2, work1, 3, '-');
  2311. printline("strrtpadnew #1", work2, ans13);
  2312.  
  2313. strtrimnew(work1, string2);
  2314. printline("strrtpadnew #2", strrtpadnew(work2, work1, 3, '-'), ans13);
  2315.  
  2316. /*    -    -    -    -    -    -    -    -    */
  2317. /*                                    */
  2318. /*    strrtrot                            */
  2319. /*                                    */
  2320. strcpy(work1, string1);
  2321. strrtrot(work1, 10);
  2322. printline("strrtrot #1", work1, ans08);
  2323.  
  2324. strcpy(work1, string1);
  2325. printline("strrtrot #2", strrtrot(work1, 10), ans08);
  2326.  
  2327. /*    -    -    -    -    -    -    -    -    */
  2328. /*                                    */
  2329. /*    strrtrotnew                            */
  2330. /*                                    */
  2331. strcpy(work1, string1);
  2332. strrtrotnew(work2, work1, 10);
  2333. printline("strrtrotnew #1", work2, ans08);
  2334.  
  2335. strcpy(work1, string1);
  2336. printline("strrtrotnew #2", strrtrotnew(work2, work1, 10), ans08);
  2337.  
  2338. /*    -    -    -    -    -    -    -    -    */
  2339. /*                                    */
  2340. /*    strrtsh                                */
  2341. /*                                    */
  2342. strcpy(work1, string1);
  2343. strrtsh(work1, 11);
  2344. printline("strrtsh #1", work1, ans04);
  2345.  
  2346. strcpy(work1, string1);
  2347. printline("strrtsh #2", strrtsh(work1, 11), ans04);
  2348.  
  2349. /*    -    -    -    -    -    -    -    -    */
  2350. /*                                    */
  2351. /*    strrtshnew                            */
  2352. /*                                    */
  2353. strcpy(work1, string1);
  2354. strrtshnew(work2, work1, 11);
  2355. printline("strrtshnew #1", work2, ans04);
  2356.  
  2357. strcpy(work1, string1);
  2358. printline("strrtshnew #2", strrtshnew(work2, work1, 11), ans04);
  2359.  
  2360. /*    -    -    -    -    -    -    -    -    */
  2361. /*                                    */
  2362. /*    strrtsize                            */
  2363. /*                                    */
  2364. strcpy(work1, string1);
  2365. strrtsize(work1, 9);
  2366. printline("strrtsize #1", work1, ans02);
  2367.  
  2368. strrtsize(work1, 20);
  2369. printline("strrtsize #2", work1, ans41);
  2370.  
  2371. strcpy(work1, string1);
  2372. printline("strrtsize #3", strrtsize(work1, 9), ans02);
  2373.  
  2374. /*    -    -    -    -    -    -    -    -    */
  2375. /*                                    */
  2376. /*    strrtsizenew                            */
  2377. /*                                    */
  2378. strrtsizenew(work1, string1, 9);
  2379. printline("strrtsizenew #1", work1, ans02);
  2380.  
  2381. strrtsizenew(work2, work1, 20);
  2382. printline("strrtsizenew #2", work2, ans41);
  2383.  
  2384. printline("strrtsizenew #1", strrtsizenew(work1, string1, 9), ans02);
  2385.  
  2386. /*    -    -    -    -    -    -    -    -    */
  2387. /*                                    */
  2388. /*    strrttrim                            */
  2389. /*                                    */
  2390. strcpy(work1, string2);
  2391. strrttrim(work1);
  2392. printline("strrttrim #1", work1, ans10);
  2393.  
  2394. strcpy(work1, string2);
  2395. printline("strrttrim #2", strrttrim(work1), ans10);
  2396.  
  2397. /*    -    -    -    -    -    -    -    -    */
  2398. /*                                    */
  2399. /*    strrttrimnew                            */
  2400. /*                                    */
  2401. strcpy(work1, string2);
  2402. strrttrimnew(work2, work1);
  2403. printline("strrttrimnew #1", work2, ans10);
  2404.  
  2405. strcpy(work1, string2);
  2406. printline("strrttrimnew #2", strrttrimnew(work2, work1), ans10);
  2407.  
  2408. /*    -    -    -    -    -    -    -    -    */
  2409. /*                                    */
  2410. /*    strstri                                */
  2411. /*                                    */
  2412. /*    char *strstri(char *instring,  char *substring);        */
  2413. /*                                    */
  2414. /*    <== not done yet <==    */
  2415.  
  2416. /*    -    -    -    -    -    -    -    -    */
  2417. /*                                    */
  2418. /*    strsubcount                            */
  2419. /*                                    */
  2420. itoa(strsubcount("This that and the other", "th"), work1, 10);
  2421. printline("strsubcount #1", work1, "3");
  2422.  
  2423. itoa(strsubcount("This that and the other", "This that and the other thing"), work1, 10);
  2424. printline("strsubcount #2", work1, "0");
  2425.  
  2426.  
  2427. /*    -    -    -    -    -    -    -    -    */
  2428. /*                                    */
  2429. /*    strsubcounti                            */
  2430. /*                                    */
  2431. itoa(strsubcounti("This that and the other", "TH"), work1, 10);
  2432. printline("strsubcounti #1", work1, "4");
  2433.  
  2434. itoa(strsubcounti("This that", "THis that and"), work1, 10);
  2435. printline("strsubcounti #2", work1, "0");
  2436.  
  2437. /*    -    -    -    -    -    -    -    -    */
  2438. /*                                    */
  2439. /*    strsubdel                            */
  2440. /*                                    */
  2441. strcpy(work1, string1);
  2442. strsubdel(work1, "time date ");
  2443. printline("strsubdel #1", work1, ans03);
  2444.  
  2445. strcpy(work1, string1);
  2446. printline("strsubdel #2", strsubdel(work1, "time date "), ans03);
  2447.  
  2448. /*    -    -    -    -    -    -    -    -    */
  2449. /*                                    */
  2450. /*    strsubdelall                            */
  2451. /*                                    */
  2452. strcpy(work1, "This that and the other");
  2453. strsubdelall(work1, "th");
  2454. printline("strsubdelall #1", work1, "This at and e oer");
  2455.  
  2456. strcpy(work1, "This that and the other");
  2457. printline("strsubdelall #2", strsubdelall(work1, "th"), "This at and e oer");
  2458.  
  2459. printline("strsubdelall #3", strsubdelall("this", "this and that"), "this");
  2460. /*    -    -    -    -    -    -    -    -    */
  2461. /*                                    */
  2462. /*    strsubdelallnew                            */
  2463. /*                                    */
  2464. /* <== next mod goes here <==    */
  2465. strcpy(work1, "This that and the other");
  2466. strsubdelallnew(work2, work1, "th");
  2467. printline("strsubdelallnew #1", work2, "This at and e oer");
  2468.  
  2469. strcpy(work1, "This that and the other");
  2470. printline("strsubdelallnew #2", strsubdelallnew(work2, work1, "th"),
  2471.                     "This at and e oer");
  2472.  
  2473. /*    -    -    -    -    -    -    -    -    */
  2474. /*                                    */
  2475. /*    strsubdeli                            */
  2476. /*                                    */
  2477. strcpy(work1, "This that and the other");
  2478. strsubdeli(work1, "th");
  2479. printline("strsubdeli #1", work1, "is that and the other");
  2480.  
  2481. strcpy(work1, "This that and the other");
  2482. printline("strsubdeli #2", strsubdeli(work1, "th"), "is that and the other");
  2483.  
  2484. /*    -    -    -    -    -    -    -    -    */
  2485. /*                                    */
  2486. /*    strsubdeliall                            */
  2487. /*                                    */
  2488. strcpy(work1, "This that and the other");
  2489. strsubdeliall(work1, "TH");
  2490. printline("strsubdelall #1", work1, "is at and e oer");
  2491.  
  2492. strcpy(work1, "This that and the other");
  2493. printline("strsubdelall #2", strsubdeliall(work1, "TH"), "is at and e oer");
  2494.  
  2495. /*    -    -    -    -    -    -    -    -    */
  2496. /*                                    */
  2497. /*    strsubdeliallnew                        */
  2498. /*                                    */
  2499. strcpy(work1, "This that and the other");
  2500. strsubdeliallnew(work2, work1, "TH");
  2501. printline("strsubdeliallnew #1", work2, "is at and e oer");
  2502.  
  2503. strcpy(work1, "This that and the other");
  2504. printline("strsubdeliallnew #2", strsubdeliallnew(work2, work1, "TH"),
  2505.                         "is at and e oer");
  2506.  
  2507. /*    -    -    -    -    -    -    -    -    */
  2508. /*                                    */
  2509. /*    strsubdelinew                            */
  2510. /*                                    */
  2511. strcpy(work1, "This that and the other");
  2512. strsubdelinew(work2, work1, "th");
  2513. printline("strsubdelinew #1", work2, "is that and the other");
  2514.  
  2515. strcpy(work1, "This that and the other");
  2516. printline("strsubdelinew #2", strsubdelinew(work2, work1, "th"),
  2517.                         "is that and the other");
  2518.  
  2519. /*    -    -    -    -    -    -    -    -    */
  2520. /*                                    */
  2521. /*    strsubdelnew                            */
  2522. /*                                    */
  2523. strcpy(work1, string1);
  2524. strsubdelnew(work2, work1, "time date ");
  2525. printline("strsubdel #1", work2, ans03);
  2526.  
  2527. strcpy(work1, string1);
  2528. printline("strsubdel #2", strsubdelnew(work2, work1, "time date "), ans03);
  2529.  
  2530. /*    -    -    -    -    -    -    -    -    */
  2531. /*                                    */
  2532. /*    strsubrpl                            */
  2533. /*                                    */
  2534. strcpy(work1, string1);
  2535. strsubrpl(work1, "date", "new");
  2536. printline("strsubrpl #1", work1, ans31);
  2537.  
  2538. strcpy(work1, string1);
  2539. printline("strsubrpl #2", strsubrpl(work1, "time", "----"), ans19 + 4);
  2540. /*    -    -    -    -    -    -    -    -    */
  2541. /*                                    */
  2542. /*    strsubrplall                            */
  2543. /*                                    */
  2544. strcpy(work1, "This that and the other");
  2545. tempi = strsubrplall(work1, "th", "TH");
  2546. printline("strsubrplall #1a", work1, "This THat and THe oTHer");
  2547. itoa(tempi, work2, 10);
  2548. printline("strsubprlall #1b", work2, "3");
  2549.  
  2550. /*    -    -    -    -    -    -    -    -    */
  2551. /*                                    */
  2552. /*    strsubrplallnew                            */
  2553. /*                                    */
  2554. strcpy(work1, "This that and the other");
  2555. tempi = strsubrplallnew(work2, work1, "th", "TH");
  2556. printline("strsubrplallnew #1a", work2, "This THat and THe oTHer");
  2557. itoa(tempi, work2, 10);
  2558. printline("strsubprlallnew #1b", work2, "3");
  2559.  
  2560. /*    -    -    -    -    -    -    -    -    */
  2561. /*                                    */
  2562. /*    strsubrpli                            */
  2563. /*                                    */
  2564. strcpy(work1, "This that and the other");
  2565. strsubrpli(work1, "th", "TH");
  2566. printline("strsubrpli #1", work1, "THis that and the other");
  2567.  
  2568. strcpy(work1, "This that and the other");
  2569. printline("strsubrpli #1", strsubrpli(work1, "th", "TH") - 2,
  2570.                 "THis that and the other");
  2571.  
  2572. /*    -    -    -    -    -    -    -    -    */
  2573. /*                                    */
  2574. /*    strsubrpliall                            */
  2575. /*                                    */
  2576. strcpy(work1, "This that and the other");
  2577. tempi = strsubrpliall(work1, "Th", "TH");
  2578. printline("strsubrpliall #1a", work1, "THis THat and THe oTHer");
  2579. itoa(tempi, work2, 10);
  2580. printline("strsubrpliall #1b", work2, "4");
  2581.  
  2582. /*    -    -    -    -    -    -    -    -    */
  2583. /*                                    */
  2584. /*    strsubrpliallnew                        */
  2585. /*                                    */
  2586. strcpy(work1, "This that and the other");
  2587. tempi = strsubrpliallnew(work2, work1, "Th", "TH");
  2588. printline("strsubrpliallnew #1a", work2, "THis THat and THe oTHer");
  2589. itoa(tempi, work2, 10);
  2590. printline("strsubrpliallnew #1b", work2, "4");
  2591.  
  2592. /*    -    -    -    -    -    -    -    -    */
  2593. /*                                    */
  2594. /*    strsubrplinew                            */
  2595. /*                                    */
  2596. strcpy(work1, "This that and the other");
  2597. strsubrplinew(work2, work1, "th", "TH");
  2598. printline("strsubrplinew  #1", work2, "THis that and the other");
  2599.  
  2600. strcpy(work1, "This that and the other");
  2601. printline("strsubrplinew  #2", strsubrplinew(work2, work1, "th", "TH") - 2,
  2602.                     "THis that and the other");
  2603.  
  2604. /*    -    -    -    -    -    -    -    -    */
  2605. /*                                    */
  2606. /*    strsubrplnew                            */
  2607. /*                                    */
  2608. strcpy(work1, string1);
  2609. strsubrplnew(work2, work1, "time", "----");
  2610. printline("strsubrplnew #1", work2, ans19);
  2611.  
  2612. strcpy(work1, string1);
  2613. printline("strsubrplnew #2", strsubrplnew(work2, work1, "time", "----"), ans19);
  2614.  
  2615. /*    -    -    -    -    -    -    -    -    */
  2616. /*                                    */
  2617. /*    strtabtoblank                            */
  2618. /*                                    */
  2619. strcpy(work1, "This is \tthe \tsample line");
  2620. strtabtoblank(work1, 8);
  2621. printline("strtabtoblank #1", work1, "This is         the     sample line");
  2622.  
  2623. strcpy(work1, "This is \tthe \tsample line");
  2624. strtabtoblank(work1, 4);
  2625. printline("strtabtoblank #2", work1, "This is     the     sample line");
  2626.  
  2627. strcpy(work1, "This is \tthe \tsample line");
  2628. printline("strtabtoblank #3", strtabtoblank(work1, 8),
  2629.         "This is         the     sample line");
  2630.  
  2631. /*    -    -    -    -    -    -    -    -    */
  2632. /*                                    */
  2633. /*    strtextfirst                            */
  2634. /*                                    */
  2635. strtextfirst(work1, string7);
  2636. printline("strtextfirst #1", work1, "text1");
  2637.  
  2638. strtextfirst(work1, string4);
  2639. printline("strtextfirst #2", work1, "12345");
  2640.  
  2641. printline("strtextfirst #3", strtextfirst(work1, "this"), "this");
  2642.  
  2643. /*    -    -    -    -    -    -    -    -    */
  2644. /*                                    */
  2645. /*    strtextget                            */
  2646. /*                                    */
  2647. strtextget(work1, string7);
  2648. printline("strtextget #1", work1, "text1");
  2649.  
  2650. strtextget(work1, string2);
  2651. printline("strtextget #2", work1, "");
  2652.  
  2653. printline("strtextget #3", strtextget(work1, string7), "text1");
  2654.  
  2655. /*    -    -    -    -    -    -    -    -    */
  2656. /*                                    */
  2657. /*    strtextlast                            */
  2658. /*                                    */
  2659. strtextlast(work1, string7);
  2660. printline("strtextlast #1", work1, "so");
  2661.  
  2662. strtextlast(work1, string2);
  2663. printline("strtextlast #2", work1, ans11);
  2664.  
  2665. printline("strtextlast #3", strtextlast(work1, string7), "so");
  2666.  
  2667. /*    -    -    -    -    -    -    -    -    */
  2668. /*                                    */
  2669. /*    strtextnext                            */
  2670. /*                                    */
  2671. strtextnext(work1, string7);
  2672. printline("strtextnext #1", work1, "text2");
  2673.  
  2674. strtextnext(work1, string1+17);
  2675. printline("strtextnext #2", work1, "");
  2676.  
  2677. printline("strtextnext #3", strtextnext(work1, string7 + 5), "text2");
  2678.  
  2679. printline("strtextnext #4", strtextnext(work1, ans42), "123");
  2680.  
  2681. /*    -    -    -    -    -    -    -    -    */
  2682. /*                                    */
  2683. /*    strtextprev                            */
  2684. /*                                    */
  2685. strtextprev(work1, string7+10);
  2686. printline("strtextprev #1", work1, "text1");
  2687.  
  2688. strtextprev(work1, strend(string2));
  2689. printline("strtextprev #2", work1, ans11);
  2690.  
  2691. printline("strtextprev #3", strtextprev(work1, string7+16), "text2");
  2692.  
  2693. /*    -    -    -    -    -    -    -    -    */
  2694. /*                                    */
  2695. /*    strtextthis                            */
  2696. /*                                    */
  2697. strtextthis(work1, string7 + 8);
  2698. printline("strtextthis #1", work1, "text2");
  2699.  
  2700. strtextthis(work1, string2);
  2701. printline("strtextthis #2", work1, "");
  2702.  
  2703. printline("strtextthis #3", strtextthis(work1, string7 + 8), "text2");
  2704.  
  2705. /*    -    -    -    -    -    -    -    -    */
  2706. /*                                    */
  2707. /*    strtoc                                */
  2708. /*                                    */
  2709. strcpy(work1, "a\5\t\142");
  2710. strtoc(work2, work1);
  2711. printline("strtoc", work2, "a\\x05\\tb");
  2712.  
  2713. /*    -    -    -    -    -    -    -    -    */
  2714. /*                                    */
  2715. /*    strtolower                            */
  2716. /*                                    */
  2717. strcpy(work1, ans21);
  2718. strtolower(work1);
  2719. printline("strtolower #1", work1, string1);
  2720.  
  2721. strcpy(work1, ans21);
  2722. printline("strtolower #2", strtolower(work1), string1);
  2723.  
  2724. /*    -    -    -    -    -    -    -    -    */
  2725. /*                                    */
  2726. /*    strtolowernew                            */
  2727. /*                                    */
  2728. strtolowernew(work1, ans21);
  2729. printline("strtolowernew #1", work1, string1);
  2730.  
  2731. printline("strtolowernew #2", strtolowernew(work1, ans21), string1);
  2732.  
  2733. /*    -    -    -    -    -    -    -    -    */
  2734. /*                                    */
  2735. /*    strtoupper                            */
  2736. /*                                    */
  2737. strcpy(work1, string1);
  2738. strtoupper(work1);
  2739. printline("strtoupper #1", work1, ans21);
  2740.  
  2741. strcpy(work1, string1);
  2742. printline("strtoupper #2", strtoupper(work1), ans21);
  2743.  
  2744. /*    -    -    -    -    -    -    -    -    */
  2745. /*                                    */
  2746. /*    strtouppernew                            */
  2747. /*                                    */
  2748. strtouppernew(work1, string1);
  2749. printline("strtouppernew #1", work1, ans21);
  2750.  
  2751. printline("strtouppernew #2", strtouppernew(work1, string1), ans21);
  2752.  
  2753. /*    -    -    -    -    -    -    -    -    */
  2754. /*                                    */
  2755. /*    strtrim                                */
  2756. /*                                    */
  2757. strcpy(work1, string2);
  2758. strtrim(work1);
  2759. printline("strtrim #1", work1, ans11);
  2760.  
  2761. strcpy(work1, string2);
  2762. printline("strtrim #2", strtrim(work1), ans11);
  2763.  
  2764. /*    -    -    -    -    -    -    -    -    */
  2765. /*                                    */
  2766. /*    strtrimnew                            */
  2767. /*                                    */
  2768. strcpy(work1, string2);
  2769. strtrimnew(work2, work1);
  2770. printline("strtrimnew #1", work2, ans11);
  2771.  
  2772. strcpy(work1, string2);
  2773. printline("strtrimnew #2", strtrimnew(work2, work1), ans11);
  2774.  
  2775. /*    -    -    -    -    -    -    -    -    */
  2776. /*                                    */
  2777. /*    strwordfirst                            */
  2778. /*                                    */
  2779. strwordfirst(work1, string1);
  2780. printline("strwordfirst #1", work1, "time");
  2781.  
  2782. strwordfirst(work1, string2);
  2783. printline("strwordfirst #2", work1, ans11);
  2784.  
  2785. printline("strwordfirst #3", strwordfirst(work1, "this"), "this");
  2786.  
  2787. /*    -    -    -    -    -    -    -    -    */
  2788. /*                                    */
  2789. /*    strwordget                            */
  2790. /*                                    */
  2791. strwordget(work1, string1);
  2792. printline("strwordget #1", work1, "time");
  2793.  
  2794. strwordget(work1, string2);
  2795. printline("strwordget #2", work1, "");
  2796.  
  2797. printline("strwordget #3", strwordget(work1, string1), "time");
  2798.  
  2799. /*    -    -    -    -    -    -    -    -    */
  2800. /*                                    */
  2801. /*    strwordlast                            */
  2802. /*                                    */
  2803. strwordlast(work1, string1);
  2804. printline("strwordlast #1", work1, ans30);
  2805.  
  2806. strwordlast(work1, string2);
  2807. printline("strwordlast #2", work1, ans11);
  2808.  
  2809. printline("strwordlast #3", strwordlast(work1, string1), ans30);
  2810.  
  2811. /*    -    -    -    -    -    -    -    -    */
  2812. /*                                    */
  2813. /*    strwordnext                            */
  2814. /*                                    */
  2815. strwordnext(work1, string1+3);
  2816. printline("strwordnext #1", work1, "date");
  2817.  
  2818. strwordnext(work1, string1+17);
  2819. printline("strwordnext #2", work1, "");
  2820.  
  2821. printline("strwordnext #3", strwordnext(work1, string1+3), "date");
  2822.  
  2823. /*    -    -    -    -    -    -    -    -    */
  2824. /*                                    */
  2825. /*    strwordprev                            */
  2826. /*                                    */
  2827. strwordprev(work1, string1+10);
  2828. printline("strwordprev #1", work1, "date");
  2829.  
  2830. strwordprev(work1, strend(string2));
  2831. printline("strwordprev #2", work1, ans11);
  2832.  
  2833. printline("strwordprev #3", strwordprev(work1, string1+10), "date");
  2834.  
  2835. /*    -    -    -    -    -    -    -    -    */
  2836. /*                                    */
  2837. /*    strwordthis                            */
  2838. /*                                    */
  2839. strwordthis(work1, string1 + 5);
  2840. printline("strwordthis #1", work1, "date");
  2841.  
  2842. strwordthis(work1, string2);
  2843. printline("strwordthis #2", work1, "");
  2844.  
  2845. printline("strwordthis #3", strwordthis(work1, string1 + 8), "date");
  2846.  
  2847. /*    -    -    -    -    -    -    -    -    */
  2848. /*                                    */
  2849. /*    strxcat                                */
  2850. /*                                    */
  2851. work1[0] = EOS;
  2852. strxcat(work1, "time ", "date ", "size ", "other", NULL);
  2853. printline("strxcat #1", work1, string1);
  2854.  
  2855. work1[0] = EOS;
  2856. printline("strxcat #2", strxcat(work1, "time ",
  2857.       "date ", "size ", "other", NULL), string1);
  2858.  
  2859. /*    -    -    -    -    -    -    -    -    */
  2860. /*                                    */
  2861. /*    strxcatn                            */
  2862. /*                                    */
  2863. work1[0] = EOS;
  2864. strxcatn(work1, 20, "time ", "date ", "size ",
  2865.             "other", "and then some", NULL);
  2866. printline("strxcatn #1", work1, string1);
  2867.  
  2868. work1[0] = EOS;
  2869. strxcatn(work1, 9, "time ", "date ", "size ",
  2870.            "other", "and then some", NULL);
  2871. printline("strxcatn #2", work1, ans02);
  2872.  
  2873. work1[0] = EOS;
  2874. printline("strxcatn #3", strxcatn(work1, 20, "time ", "date ",
  2875.       "size ", "other", "and then some", NULL), string1);
  2876.  
  2877. /*    -    -    -    -    -    -    -    -    */
  2878. /*                                    */
  2879. /*    strzero                                */
  2880. /*                                    */
  2881. strcpy(work1, string1);
  2882. strzero(work1);
  2883. printline("strzero #1", work1, "00000000000000000000");
  2884.  
  2885. strcpy(work1, string1);
  2886. printline("strzero #2", strzero(work1), "00000000000000000000");
  2887.  
  2888. /*    -    -    -    -    -    -    -    -    */
  2889. /*                                    */
  2890. /*    clean up and say goodnight                    */
  2891. /*                                    */
  2892. printf("\n\ntotal number of errors found: %d\n\n", ne);
  2893. if (printflag)
  2894.   printf("\n\ndone\n\n");        /* say goodnight        */
  2895. }                    /* end main            */
  2896. /*                                    */
  2897. /************************************************************************/
  2898. /*                                    */
  2899. /*    printline --- print the test name, test answer, and OK/bad    */
  2900. /*                                    */
  2901. void printline(                /* no return            */
  2902.     char *linehead,            /* test name            */
  2903.     char *answer,            /* test answer            */
  2904.     char *OKanswer)            /* correct answer        */
  2905. { strcpy(part1, linehead);        /* put the test name in part1    */
  2906.   if (answer != NULL)            /* if the answer is not NULL,    */
  2907.   { strlfpad(part2, 1, '\"');        /* put the test answer in    */
  2908.     strcpy(part2+1, answer);        /*   part2, convert tabs to    */
  2909.     strtabtoblank(part2, 8);        /*     blanks, and wrap        */
  2910.     strrtpad(part2, 1, '\"');        /*     quotes around part2    */
  2911.   }                    /* end if answer not NULL    */
  2912.   else                    /* otherwise, the answer is    */
  2913.     strcpy(part2, "(null)");        /*   NULL, so insert "(null)"    */
  2914.   strrtsize(part1, 25);            /* force part1 to 25 characters    */
  2915.   strrtsize(part2, 25);            /* force part2 to 25 characters    */
  2916.   if (strcmp(answer, OKanswer))        /* if the answer is bad,    */
  2917.   { printf("\n%s%s", part1, part2);    /*   print test name & answer    */
  2918.     printf("\7 WRONG <==");        /*     and tack on "WRONG"    */
  2919.     ne++;                /*     and number of errors++ */
  2920.   }                    /* end if answer is bad        */
  2921.   else                    /* otherwise, answer was good,    */
  2922.   { if (printflag)            /*   so if the print flag is    */
  2923.     { printf("\n%s%s", part1, part2);    /*     on, print test name    */
  2924.       printf(" OK");            /*     and answer, and tack    */
  2925.     }                    /*       on "OK"        */
  2926.   }                    /* end else answer was bad    */
  2927. }                    /* end function printline    */
  2928.  
  2929.  
  2930.  
  2931.